Azure / openapi-diff

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

Improve message for error "incompatible properties" #315

Closed mikeharder closed 3 months ago

mikeharder commented 3 months ago

The message for error "incompatible properties" only includes the key:

https://github.com/Azure/openapi-diff/blob/a81378284d200379db53d518ba004d16df9d2a7f/src/lib/util/resolveSwagger.ts#L247-L249

This can make it hard to determine the problem in the spec, especially if the incompatible property is being pulled in through allOf. For example:

https://github.com/Azure/azure-sdk-tools/issues/7917

This error could be improved by:

  1. Include the incompatible properties themselves in the error message
  2. Include line numbers of the incompatible properties