Azure / openapi-diff

Command line tool to detect breaking changes between two openapi specifications
MIT License
256 stars 36 forks source link

[Rule] breaking changes, when `x-ms-enum` change #242

Closed tadelesh closed 1 year ago

tadelesh commented 2 years ago

Several changes with x-ms-enum will cause breaking changes:

  1. Add x-ms-enum in existed enum with different name with auto-generated one
  2. Add x-ms-enum in existed enum with modelAsString
  3. Change x-ms-enum modelAsString
  4. Change x-ms-enum name

Related issue: https://github.com/Azure/azure-sdk-tools/issues/4073

jianyexi commented 2 years ago

@mikekistler could you help confirm this rule ?

mikekistler commented 2 years ago

I think all of the above will result in breaking changes in the generated SDKs:

  1. will change the name of the enum
  2. will change the enum type (in some SDKs) if modelAsString is set to "true"
  3. will change the enum type (in some SDKs)
  4. will change the name of the enum

So all should be flagged as breaking.

jianyexi commented 1 year ago

I think the enum name change or type change are already covered, only need to check the 'name' and 'modelAsString' change for the x-ms-enum