Overlay-Specification icon indicating copy to clipboard operation
Overlay-Specification copied to clipboard

Add compliant example sets to show expected behaviour

Open lornajane opened this issue 1 year ago • 8 comments

These examples are taken from the test suite of https://github.com/lornajane/openapi-overlays-js (and with thanks to @MikeRalphson who helped with the tests originally!) to illustrate the expected outputs from applying particular Overlays to OpenAPI descriptions.

I think these examples could be improved/expanded, and I'm not sure if we should try to somehow standardise how whitespace/quotes work because they are most of the diff. Would it make sense to lint/format all the yaml? Advice welcome!

lornajane avatar Nov 19 '24 21:11 lornajane

we should try to somehow standardise how whitespace/quotes work because they are most of the diff

I'd run Prettier on the YAML files to minimize these differences.

ralfhandl avatar Nov 20 '24 10:11 ralfhandl

There should also be JSON inputs.

And some "mixed" inputs with OpenAPI JSON and Overlay YAML, and vice versa. Would the output format be determined by the format of the OpenAPI input? The spec doesn't tell.

ralfhandl avatar Nov 20 '24 10:11 ralfhandl

Fair enough. I don't think these are of a quality that we can publish for tests but from our conversation yesterday I thought we agreed that sharing whatever we had would be useful at this stage. Should I just close?

lornajane avatar Nov 20 '24 11:11 lornajane

Don't close, I think these are a good starting point. Even if they aren't complete yet, they are behavior that we expect from each implementation.

ralfhandl avatar Nov 20 '24 11:11 ralfhandl

This change is super useful, even in it's current state. I am building a ruby library against this right now ♥️

ahx avatar Feb 27 '25 16:02 ahx

@ahx thanks for the encouraging words! I've updated the PR and re-requested reviews for it.

lornajane avatar Mar 11 '25 15:03 lornajane

This looks really great and would really like to see it approved.

mikeschinkel avatar Mar 11 '25 15:03 mikeschinkel

@ralfhandl Could you check if these were the changes you had in mind?

lornajane avatar Mar 25 '25 14:03 lornajane