pb33f / openapi-changes

The world's sexiest OpenAPI breaking changes detector. Discover what changed between two OpenAPI specs, or a single spec over time. Supports OpenAPI 3.1, 3.0 and Swagger
https://pb33f.io/openapi-changes/
Other
180 stars 16 forks source link

renaming properties is not detected as (breaking) change #80

Closed dloibl closed 9 months ago

dloibl commented 10 months ago

Hi,

first thanks for this awesome project! When using openapi-changes I noticed that renaming properties are not detected at changes. Removal or changing types is detected correctly.

Example to reproduce:

openapi-changes summary original.yaml changed.yaml

original.yaml

openapi: 3.1.0
paths:
  /api/header:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string

changed.yaml

openapi: 3.1.0
paths:
  /api/header:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  text: # breaking change!
                    type: string

output: SUCCESS No changes detected

should be: ERROR breaking changes discovered

daveshanley commented 9 months ago

Thank you for your kind words!

This is strange, I will look into this for you.

daveshanley commented 9 months ago

This has been resolved in v0.0.52

Here is the output using these example specs.

Screenshot 2024-01-05 at 8 54 32 AM