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

Add new property for CORS settings #6478

Merged
merged 1 commit into from
Jul 26, 2019
Merged

Add new property for CORS settings #6478

merged 1 commit into from
Jul 26, 2019

Conversation

juniwang
Copy link
Contributor

Changes:

Add new property for CORS settings which enables customers to configure Cross-Origin Resource Sharing.

Tests:

all validations documented on https://github.com/Azure/adx-documentation-pr/wiki/Swagger-Validation-Tools passed.

Latest improvements:

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Jun 27, 2019

@AutorestCI
Copy link

AutorestCI commented Jun 27, 2019

Automation for azure-sdk-for-python

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-python#5532

@AutorestCI
Copy link

AutorestCI commented Jun 27, 2019

Automation for azure-sdk-for-ruby

A PR has been created for you:
Azure/azure-sdk-for-ruby#2688

@AutorestCI
Copy link

AutorestCI commented Jun 27, 2019

Automation for azure-sdk-for-java

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-java#3177

@AutorestCI
Copy link

AutorestCI commented Jun 27, 2019

Automation for azure-sdk-for-go

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-go#5348

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@Juliehzl Juliehzl added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jun 28, 2019
@ghost
Copy link

ghost commented Jul 2, 2019

@openapi sdkautomation rebuild

@sanjaiganesh
Copy link
Contributor

pls add this new property under new api version, to avoid confusion when client uses mix of new and old sdks.
(one call to populate 'cors' property and one call with old sdk without 'cors' property)

@sanjaiganesh sanjaiganesh added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Jul 6, 2019
@juniwang
Copy link
Contributor Author

juniwang commented Jul 7, 2019

Do we have to add a new api-version? Our latest RP is compatible with older SDKs. It works fine with or without the cors property

@KrisBash
Copy link
Contributor

Do we have to add a new api-version? Our latest RP is compatible with older SDKs. It works fine with or without the cors property

@juniwang The concern with adding a writable property in an existing API version is that there will be a mix of clients that are on older and newer versions. If the property is set by a latest version client, and the resource is then modified by a downlevel client, your service cannot know whether the property was intentionally removed or the result of a downlevel client.

@juniwang
Copy link
Contributor Author

@juniwang The concern with adding a writable property in an existing API version is that there will be a mix of clients that are on older and newer versions. If the property is set by a latest version client, and the resource is then modified by a downlevel client, your service cannot know whether the property was intentionally removed or the result of a downlevel client.

Thanks @KrisBash. We got the point. It's a good pattern to add new API version to avoid confusion. But for this perticular case, the CORS settings by design CANNOT be removed. Clients are only allowed to modify it by passsing in an non-empty value. A value of null (either using older SDK or intentionally set in newer ones) results in remaining the current value unchanged. A default non-empty value will be set while creating(for both older clients and newer clients with null value). Does this make sense to keep using the same api-version?

@KrisBash
Copy link
Contributor

@juniwang The concern with adding a writable property in an existing API version is that there will be a mix of clients that are on older and newer versions. If the property is set by a latest version client, and the resource is then modified by a downlevel client, your service cannot know whether the property was intentionally removed or the result of a downlevel client.

Thanks @KrisBash. We got the point. It's a good pattern to add new API version to avoid confusion. But for this perticular case, the CORS settings by design CANNOT be removed. Clients are only allowed to modify it by passsing in an non-empty value. A value of null (either using older SDK or intentionally set in newer ones) results in remaining the current value unchanged. A default non-empty value will be set while creating(for both older clients and newer clients with null value). Does this make sense to keep using the same api-version?

I think that's ok.

Copy link
Contributor

@KrisBash KrisBash left a comment

Choose a reason for hiding this comment

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

Approving for ARM

@KrisBash KrisBash added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants