mrin9 / OpenAPI-Viewer

OpenApi viewer Implemented using Vue
https://mrin9.github.io/OpenAPI-Viewer/
104 stars 21 forks source link

OpenAPI v3.1 Support #10

Open philsturgeon opened 2 years ago

philsturgeon commented 2 years ago

Hello! As the maintainer of openapi.tools, and as somebody works with Linux Foundation helping out in OpenAPI-land, I'm reaching out to tooling vendors to track the progress towards supporting OpenAPI v3.1, to see what roadblocks there are beyond folks just generally being busy at this ridiculous time.

OpenAPI v3.1 has a bunch of great little changes, solving problems like the the JSON Schema <!=> OpenAPI Schema Object divergence. It also fixes some other inconsistencies and duplicate ways of doing things. It's the best version and everyone should be using it, but we need tooling to catch up. Just in case folks didn't notice, or don't have resources to simplify the process, I'm here to give a friendly prod and send over some handy links.

Here are a few articles showing off the differences between OpenAPI v3.0 and v3.1.

Here are some example files which can make for handy pass/fail test cases:

https://github.com/Mermade/openapi3-examples/tree/master/3.1

If you're looking for the JSON Schema that defines a valid OpenAPI document, that'll be right over here:

https://github.com/OAI/OpenAPI-Specification/tree/main/schemas/v3.1

Currently I'm noticing generic errors when I try and use anything with openapi: 3.1.0 in it, regardless of the rest of the document. Even if its a perfectly valid 3.0 with nothing 3.1 specific in there, if I change that version number in the document it will error immediately. Perhaps a little quick win could be to focus on the schema object changes, like nullable, example, exclusiveMinimum etc. being automatically converted to their new JSON Schema counterparts, then you can worry about all webhooks and other big stuff later.

No rush, but when you're starting work on it, please update this issue so I can update openapi.tools to reflect that, and folks will have a way to subscribe for updates.

LMK if you have any questions!