Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5869,11 +5869,15 @@
},
"ThroughputSettingsResource": {
"type": "object",
"description": "Cosmos DB resource throughput object",
"description": "Cosmos DB resource throughput object. Either throughput is required or autopilotSettings is required, but not both.",
"properties": {
"throughput": {
"type": "integer",
"description": "Value of the Cosmos DB resource throughput"
"description": "Value of the Cosmos DB resource throughput. Either throughput is required or autopilotSettings is required, but not both."
},
"autopilotSettings": {
"description": "Cosmos DB resource for Autopilot settings. Either throughput is required or autopilotSettings is required, but not both.",
"$ref": "#/definitions/AutopilotSettingsResource"
},
"minimumThroughput": {
"type": "string",
Expand All @@ -5885,11 +5889,54 @@
"description": "The throughput replace is pending",
"readOnly": true
}
}
},
"AutopilotSettingsResource": {
"type": "object",
"description": "Cosmos DB autopilot settings object",
"properties": {
"maxThroughput": {
"type": "integer",
"description": "Represents max throughput an autopilot container can operate at."
},
"autoUpgradePolicy": {
"description": "Cosmos DB resource auto-upgrade policy",
"$ref": "#/definitions/AutoUpgradePolicyResource"
},
"targetMaxThroughput": {
"type": "integer",
"description": "Represents target max throughput an autopilot container should operate at once offer is no longer in pending state.",
"readOnly": true
}
},
"required": [
"throughput"
"maxThroughput"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like 'throughput is now not required for 'ThroughpoutSettingsResource', is that intentional, is this no longer a required property?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either "throughput" is required or "autopilotSettings" settings is required. Is there a some way to convey "requiredOneOf" @markcowl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, not until Swagger 3. It is not a breakign change to remove 'required', but I would suggest documenting the fact that one of these are required in the description of the object and in the description for both parameters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl I have updated the description of the object and in the description for both parameters

]
},
"AutoUpgradePolicyResource": {
"type": "object",
"description": "Cosmos DB resource auto-upgrade policy",
"properties": {
"throughputPolicy": {
"description": "Represents throughput policy which service must adhere to for auto-upgrade",
"$ref": "#/definitions/ThroughputPolicyResource"
}
}
},
"ThroughputPolicyResource": {
"type": "object",
"description": "Cosmos DB resource throughput policy",
"properties": {
"isEnabled": {
"type": "boolean",
"description": "Determines whether the ThroughputPolicy is active or not"
},
"incrementPercent": {
"type": "integer",
"description": "Represents the percentage by which throughput can increase every time throughput policy kicks in."
}
}
},
"SqlDatabaseResource": {
"type": "object",
"description": "Cosmos DB SQL database resource object",
Expand Down
18 changes: 18 additions & 0 deletions specification/cosmos-db/resource-manager/readme.csharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.Azure.Management.CosmosDB
output-folder: $(csharp-sdks-folder)/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated
clear-output-folder: true
```

``` yaml $(csharp) && !$(multiapi) && !$(csharp-profile)
namespace: Microsoft.Azure.Management.CosmosDB
output-folder: $(csharp-sdks-folder)/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated
```
1 change: 1 addition & 0 deletions specification/cosmos-db/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ This is not used by Autorest itself.

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