Closed TomFreeman closed 2 years ago
I wonder if some kind of bridge / adaptor solution might work in the interrim? Something that could check if it's 3.1, convert to 3.0 removing certain functioanlity, then running it through swagger parser and manually adding back in the extra features? That might provide a stop-gap until the new spec is supported, but I'm not sure exactly which features are missing and if that's just way too much effort / overhead? Just spitballing here.
https://github.com/APIDevTools/swagger-parser/issues/169
Seems this is on the radar
I don't think it would be time well spent building in a 3.1 -> 3.0 downgrader to bypass the swagger parser block.
Putting in a flag to skip validation would bypass would work until there is support for OA 3.1 validator - not seeing one on the listed tools yet from here: https://openapi.tools/#parsers
WIP: https://github.com/liffery-com/boats/pull/64
For some reason my local machine hits errors now with this new code - but it make no sense. This issue seems related, https://github.com/APIDevTools/json-schema-ref-parser/issues/14#issuecomment-698530729
Will try and pick this up again later unless anyone else gets it working before me :)
I won't look at it this weekend but if you havn't figured it out by next week i might end up taking a look. Odd error for sure
Looks like https://stoplight.io/open-source/spectral/ offers 3.1 support on the validation, not tried it yet but might be worth swapping out swagger-parser in favour
if those screen shots are true, the error looks easy on the eye too
@TomFreeman appologies for the delay on this one, the latest release has a new cli flag to skip validation.
@TomFreeman https://github.com/APIDevTools/swagger-parser/pull/187 and this should now be in the latest version of boats
Amazing! No need to apologise, I've had my head elsewhere recently too.
Is your feature request related to a problem? Please describe. Boats currently doesn't support OpenAPI 3.1 specs. Tracking any work required to support the latest spec.
Describe the solution you'd like We're blocked by swagger-parser, which currently doesn't support OpenAPI 3.1, but other blockers I'm not aware of may exist.
Describe alternatives you've considered Replace swagger-parser altogether, which seems overly intrusive. Enable a command line flag that skips the use of swagger-parser for 3.1 specs, this sacrifices value.
Additional context Thought I'd start tracking the dependencies needed to make OpenAPI 3.1 work here, specifically the webhooks feature would be useful for our use-case.