Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI 3.1 Support #63

Closed
1 task
TomFreeman opened this issue Oct 8, 2021 · 9 comments
Closed
1 task

OpenAPI 3.1 Support #63

TomFreeman opened this issue Oct 8, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@TomFreeman
Copy link

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.

@TomFreeman TomFreeman added the enhancement New feature or request label Oct 8, 2021
@p-mcgowan
Copy link
Contributor

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.

@j-d-carmichael
Copy link
Owner

APIDevTools/swagger-parser#169

Seems this is on the radar

@j-d-carmichael
Copy link
Owner

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

@j-d-carmichael
Copy link
Owner

WIP: #64

For some reason my local machine hits errors now with this new code - but it make no sense. This issue seems related, APIDevTools/json-schema-ref-parser#14 (comment)

Will try and pick this up again later unless anyone else gets it working before me :)

@p-mcgowan
Copy link
Contributor

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

@j-d-carmichael
Copy link
Owner

j-d-carmichael commented Nov 22, 2021

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

@j-d-carmichael
Copy link
Owner

@TomFreeman appologies for the delay on this one, the latest release has a new cli flag to skip validation.

@j-d-carmichael
Copy link
Owner

@TomFreeman APIDevTools/swagger-parser#187 and this should now be in the latest version of boats

@TomFreeman
Copy link
Author

Amazing! No need to apologise, I've had my head elsewhere recently too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants