openapi-diff icon indicating copy to clipboard operation
openapi-diff copied to clipboard

Show additions / changes to schema body

Open davidpearceoracle opened this issue 4 years ago • 3 comments

Is it possible to show non-breaking changes (i.e. added fields) to the schema body? The current output simply states "changed body: 'application/json'"

If I reverse the comparison I get a message: Changed body: 'application/json' Missing property: [n].id (integer)

So a useful message would be: Changed body: 'application/json' Added property: [n].id (integer)

image

davidpearceoracle avatar Jan 13 '21 09:01 davidpearceoracle

Hi!

We are trying to automate a task in our CI pipeline that generates a report of the changed endpoints. This would allow us to notify the front end team if any changes must be made.

We'd like something like this:

--------------------------------------------------------------------------
--                            What's Changed                            --
--------------------------------------------------------------------------
- PUT    /api/User
  Return Type:
    - Changed 200 OK
      Media types:
        - Changed application/json
          Schema: Backward compatible
          Added property: userName (string)
          Added property: userDescription (string)

How much effort would this feature involve? Maybe we could tackle it.

Starkie avatar Nov 24 '21 09:11 Starkie

I'd like to encourage you to please prioritize this change. After all, shouldn't one of the core features of a diff tool be to actually report all the differences?

skyellin avatar Oct 24 '23 07:10 skyellin

@skyellin Could you provide a pull request to implement the required changes? 😄

joschi avatar Dec 16 '23 22:12 joschi