Azure / Azure/azure-rest-api-specs
[cosmos-db] `Options` property in `SqlDatabaseGetResults` not returned from backend
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
# Description
In the definition of [SqlDatabaseGetResults](https://github.com/Azure/azure-rest-api-specs/blob/f780b571abddf2fc99233212a00510d3bef6878d/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-06-15/cosmos-db.json#L5510), there is an `Options` property defined.
However, that property seems not returned from backend in reality. Below are part of recording of our tests.
**Request**
```
"RequestBody": {
"tags": {},
"location": "westus2",
"properties": {
"resource": {
"id": "sql-db-4137"
},
"options": {
"throughput": 700,
"autoscaleSettings": {}
}
}
```
**Response**
```
"ResponseBody": {
"id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/dbaccount-6824/providers/Microsoft.DocumentDB/databaseAccounts/dbaccount-8602/sqlDatabases/sql-db-4137",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"name": "sql-db-4137",
"properties": {
"resource": {
"id": "sql-db-4137",
"_rid": "w8MTAA==",
"_self": "dbs/w8MTAA==/",
"_etag": "\u002200002b12-0000-0800-0000-616dfcbd0000\u0022",
"_colls": "colls/",
"_users": "users/",
"_ts": 1634598077
}
}
}
```
I checked the [example](https://github.com/Azure/azure-rest-api-specs/blob/f780b571abddf2fc99233212a00510d3bef6878d/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-06-15/examples/CosmosDBSqlDatabaseCreateUpdate.json), and `Options` is not returned in the example either. So, I'm wondering if that is a bug in backend service, or we should modify the swagger definition here?
Contributor guide
Research direction
Compare the SqlDatabaseGetResults definition in specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-06-15/cosmos-db.json with examples/CosmosDBSqlDatabaseCreateUpdate.json and the recorded response. Determine whether the missing Options property requires a specification change or backend clarification; done means the expected behavior and corresponding update are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100