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

Const changes aren't correctly detected #67

Closed srir closed 9 months ago

srir commented 1 year ago

(unsure whether this is an issue better filed here or with https://github.com/pb33f/libopenapi - feel free to redirect!)

We're trying to use openapi-changes to detect breaking spec changes to our production API.

We're not seeing changes to const values detected at all (let alone as "breaking"). I've put together a MWE to demonstrate the issue we're seeing (https://gist.github.com/srir/8513874d960a2fd5fbb380f484e4ffc0)

Expected:

Actual:

daveshanley commented 1 year ago

Ah, yes! This was a recent addition to libopenapi from the community. I don't think it's been wired into the what-changed module yet, which is why it's being ignored.

Technically the issue is in libopenapi as openapi-changes is really just an interface for the what-changed. module.

srir commented 1 year ago

makes sense - happy to file it there (edit: filed https://github.com/pb33f/libopenapi/issues/178)

(fwiw, we're using single-element enums as a workaround here, and while not as pretty, it does what we want detection-wise!)

daveshanley commented 1 year ago

I have updated the thread in https://github.com/pb33f/libopenapi/issues/178

I am unable to replicate the issue after deeper investigation, can you help?