oasdiff icon indicating copy to clipboard operation
oasdiff copied to clipboard

Feature Request: Provide a visual way to compare example diffs

Open skyellin opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. When discussing proposed contract changes, it can be very useful to visualize the differences in the examples. This provides a more intuitive way of understanding the changes than does comparing schema differences one by one.

Currently, when viewing diffs in text or html format, the example diffs remove all structure and indentation. Diffs are presented simply as long lines of text such as:

 - Examples changed
       - Modified example: successfulResponse
           - Value changed from map[. . . ] to map[. . . ]

It's very challenging if not impossible to make sense of this, when dealing with large, nested, request and response examples.

Describe the solution you'd like At a minimum, the examples should be reproduced without removing formatting (preserving line breaks and indentation). In the future, color coding could be added to highlight the changes.

skyellin avatar Oct 24 '23 10:10 skyellin