-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add cors rule in request/response for Cosmos DB #10204
Conversation
[Staging] Swagger Validation Report
❌ |
Rule | Message |
---|---|
1041 - AddedPropertyInResponse |
The new version has a new property 'cors' in response that was not found in the old version. New: Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json#L5245:7 Old: Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json#L5213:7 |
1041 - AddedPropertyInResponse |
The new version has a new property 'cors' in response that was not found in the old version. New: Microsoft.DocumentDB/stable/2020-04-01/cosmos-db.json#L5112:7 Old: Microsoft.DocumentDB/stable/2020-04-01/cosmos-db.json#L5080:7 |
️️✔️
LintDiff [Detail]
️✔️
Validation passes for LintDiff.
️️✔️
Avocado [Detail]
️✔️
Validation passes for Avocado.
Azure Pipelines successfully started running 1 pipeline(s). |
Azure CLI Extension Generation - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-go - Release
|
azure-sdk-for-java - Release
|
azure-sdk-for-js - Release
|
azure-sdk-for-net - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-python - Release
|
Trenton Generation - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-python-track2 - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
Can one of the admins verify this patch? |
@@ -5351,6 +5383,10 @@ | |||
"description": "The object representing the policy for taking backups on an account.", | |||
"type": "object", | |||
"$ref": "#/definitions/BackupPolicy" | |||
}, | |||
"cors": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding optional property also need version bump https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#api-changes-that-require-a-version-change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding property in output is breaking change, which requires version bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yungezz, this property has been available to users in production for some time, but was undocumented in swagger. We cannot add a new API version and restrict it as only available in that version because we could break users currently consuming the property. Should we add a new API version and document it there even if it remains available in previous versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for sharing, @shurd , just confirm, this PR is a fixing of Swagger bug actually right, not to introducing new property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct @yungezz
...anager/Microsoft.DocumentDB/stable/2020-04-01/examples/CosmosDBDatabaseAccountCreateMax.json
Outdated
Show resolved
Hide resolved
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines successfully started running 1 pipeline(s). |
@yungezz can you please take another look at this? As noted, this is fixing a swagger bug to match what is currently in production. |
approve since this is Swagger bug fixing PR. hi @shurd is this PR ready to merge? |
hi @yungezz this is ready to be merged |
This change adds the existing "cors" property to most recent api versions. This change has been present in our service for a while, but was overlooked when originally adding the swagger. The two API versions being updated do not yet have wide usage.
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.
If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.
Please follow the link to find more details on PR review process.