Skip to content

Commit

Permalink
Updated credentials models according to PR #24318 + reverted unwant…
Browse files Browse the repository at this point in the history
…ed changes to `readme.md`
  • Loading branch information
InbalZim committed Jun 11, 2023
1 parent c628cd2 commit d877927
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"host": "0.0.0.0",
"shareName": "examples-shareName",
"credentials": {
"type": "AzureKeyVaultSmb",
"usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-username",
"passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"
},
Expand All @@ -31,6 +32,7 @@
"host": "0.0.0.0",
"shareName": "examples-shareName",
"credentials": {
"type": "AzureKeyVaultSmb",
"usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-username",
"passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"host": "0.0.0.0",
"shareName": "examples-shareName",
"credentials": {
"type": "AzureKeyVaultSmb",
"usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-username",
"passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-password"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"endpointType": "SmbMount",
"description": "Updated Endpoint Description",
"credentials": {
"type": "AzureKeyVaultSmb",
"usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-username",
"passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-password"
}
Expand All @@ -29,6 +30,7 @@
"host": "0.0.0.0",
"shareName": "examples-shareName",
"credentials": {
"type": "AzureKeyVaultSmb",
"usernameUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-username",
"passwordUri": "https://examples-azureKeyVault.vault.azure.net/secrets/examples-updated-password"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,8 @@
]
},
"credentials": {
"description": "The secrets URIs which store the required credentials to access the SMB share.",
"$ref": "#/definitions/Credentials"
"description": "The Azure Key Vault secret URIs which store the required credentials to access the SMB share.",
"$ref": "#/definitions/AzureKeyVaultSmbCredentials"
}
},
"required": [
Expand All @@ -2111,8 +2111,8 @@
"description": "The properties of SMB share endpoint to update.",
"properties": {
"credentials": {
"description": "The secrets URIs which store the required credentials to access the SMB share.",
"$ref": "#/definitions/Credentials"
"description": "The Azure Key Vault secret URIs which store the required credentials to access the SMB share.",
"$ref": "#/definitions/AzureKeyVaultSmbCredentials"
}
},
"allOf": [
Expand All @@ -2135,21 +2135,56 @@
"modelAsString": true
}
},
"CredentialType": {
"description": "The Credentials type.",
"enum": [
"AzureKeyVaultSmb"
],
"type": "string",
"x-ms-enum": {
"name": "CredentialType",
"modelAsString": true
}
},
"Credentials": {
"description": "The secrets URIs which store the credentials.",
"description": "The Credentials.",
"type": "object",
"discriminator": "type",
"properties": {
"type": {
"description": "The Credentials type.",
"$ref": "#/definitions/CredentialType",
"x-ms-mutability": [
"read",
"create"
]
}
},
"required": [
"type"
]
},
"AzureKeyVaultSmbCredentials": {
"description": "The Azure Key Vault secret URIs which store the credentials.",
"type": "object",
"x-ms-discriminator-value": "AzureKeyVaultSmb",
"properties": {
"usernameUri": {
"description": "The secret URI which stores the username. Use empty string to clean-up existing value.",
"description": "The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.",
"type": "string",
"format": "uri"
},
"passwordUri": {
"description": "The secret URI which stores the password. Use empty string to clean-up existing value.",
"description": "The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.",
"type": "string",
"format": "uri"
}
}
},
"allOf": [
{
"$ref": "#/definitions/Credentials"
}
]
},
"JobDefinitionProperties": {
"description": "Job definition properties.",
Expand Down
12 changes: 6 additions & 6 deletions specification/storagemover/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ openapi-subtype: providerHub
tag: package-preview-2023-07
```
### Tag: package-preview-2023-07
These settings apply only when `--tag=package-preview-2023-07` is specified on the command line.

```yaml $(tag) == 'package-preview-2023-07'
``` yaml $(tag) == 'package-preview-2023-07'
input-file:
- Microsoft.StorageMover/preview/2023-07-01-preview/storagemover.json
```
### Tag: package-2023-03-01

These settings apply only when `--tag=package-2023-03-01` is specified on the command line.
### Tag: package-2023-03

These settings apply only when `--tag=package-2023-03` is specified on the command line.

``` yaml $(tag) == 'package-2023-03-01'
``` yaml $(tag) == 'package-2023-03'
input-file:
- Microsoft.StorageMover/stable/2023-03-01/storagemover.json
```
Expand All @@ -68,7 +68,7 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down

0 comments on commit d877927

Please sign in to comment.