Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressed validation errors for SQL Materialized View swagger changes #5

Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -2148,6 +2148,9 @@
},
"CosmosDBSqlContainerRestore": {
"$ref": "./examples/CosmosDBSqlContainerRestore.json"
},
"CosmosDBSqlMaterializedViewCreateUpdate": {
"$ref": "./examples/CosmosDBSqlMaterializedViewCreateUpdate.json"
}
},
"description": "Create or update an Azure Cosmos DB SQL container",
Expand Down Expand Up @@ -9430,6 +9433,11 @@
"type": "object",
"description": "Materialized View definition for the container.",
"properties": {
"sourceCollectionRid": {
"description": "An unique identifier for the source collection. This is a system generated property.",
"type": "string",
"readOnly": true
},
"sourceCollectionId": {
"description": "The name of the source container on which the Materialized View will be created.",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,83 +1,84 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2022-11-15-preview",
"subscriptionId": "subid",
"databaseName": "databaseName",
"containerName": "mvContainerName",
"createUpdateSqlContainerParameters": {
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "mvContainerName",
"partitionKey": {
"paths": [
"/pk"
],
"kind": "Hash"
},
"materializedViewDefinition": {
"sourceCollectionId": "sourceContainerName",
"definition": "select * from ROOT"
}
},
"options": {}
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2022-11-15-preview",
"subscriptionId": "subid",
"databaseName": "databaseName",
"containerName": "mvContainerName",
"createUpdateSqlContainerParameters": {
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "mvContainerName",
"partitionKey": {
"paths": [
"/pk"
],
"kind": "Hash"
},
"materializedViewDefinition": {
"sourceCollectionId": "sourceContainerName",
"definition": "select * from ROOT"
}
},
"options": {}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/mvContainerName",
"name": "mvContainerName",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers",
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "mvContainerName",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [{
"path": "/*"
}
],
"excludedPaths": [{
"path": "/\"_etag\"/?"
}
]
},
"partitionKey": {
"paths": ["/pk"],
"kind": "Hash"
},
"defaultTtl": -1,
"uniqueKeyPolicy": {
"uniqueKeys": []
},
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"geospatialConfig": {
"type": "Geography"
},
"materializedViewDefinition": {
"sourceCollectionRid": "e9N-s6Ua-4Y=",
"sourceCollectionId": "sourceContainerName",
"definition": "select * from ROOT"
},
"_rid": "e9N-s+nr644=",
"_ts": 1666700363,
"_etag": "\"00004700-0000-0800-0000-6357d44b0000\""
}
}
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/containers/mvContainerName",
"name": "mvContainerName",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers",
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "mvContainerName",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"partitionKey": {
"paths": [
"/pk"
],
"kind": "Hash"
},
"defaultTtl": -1,
"uniqueKeyPolicy": {
"uniqueKeys": []
},
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"materializedViewDefinition": {
"sourceCollectionRid": "e9N-s6Ua-4Y=",
"sourceCollectionId": "sourceContainerName",
"definition": "select * from ROOT"
},
"_rid": "e9N-s+nr644=",
"_ts": 1666700363,
"_etag": "\"00004700-0000-0800-0000-6357d44b0000\""
}
},
"202": {}
}
}
},
"202": {}
}
}