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

[Rule] breaking changes, when x-ms-discriminator-value changes #241

Open
weidongxu-microsoft opened this issue Sep 5, 2022 · 2 comments
Labels

Comments

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Sep 5, 2022

Case: Azure/azure-rest-api-specs#20376 (comment)

Reason:
x-ms-discriminator-value is used in client to choose the correct type/class to initialize.

Changing its value will break SDK in runtime (there will be no API change, but SDK will fail to initialize the type in runtime), or client code (if customer uses REST API directly, and use its value to match the type).

@weidongxu-microsoft weidongxu-microsoft changed the title [Rule] flag as breaking changes, when x-ms-discriminator-value changes [Rule] breaking changes, when x-ms-discriminator-value changes Sep 5, 2022
@jianyexi jianyexi added the Rule label Sep 7, 2022
@jianyexi
Copy link
Contributor

jianyexi commented Sep 7, 2022

@mikekistler could you help confirm this rule?

@mikekistler
Copy link
Member

I agree that this should be flagged by the breaking changes tooling. There may be cases where this isn't breaking, but there certainly are cases where it is, so we need to flag it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants