-
Notifications
You must be signed in to change notification settings - Fork 211
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
Switch oas-validator to @stoplightio/spectral #410
base: master
Are you sure you want to change the base?
Conversation
Most tests are passing but some are still failing. Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
Switched to Buffer.from() Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
Implement a partial getLinkLocationType: Technically 'title' type does not exist, it should be file. operationRef follows the same guidelines as $ref. See https://swagger.io/docs/specification/using-ref/ The only types that **really** exist are local, remote, and url. Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
I should also point out that due to operationRef uri syntax requirements, AKA using the title of the specification in |
Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
@FallingSnow Thank you for this PR! Could you explain some of the reasoning behind this change? I am not very familiar with
Thank you for pointing this out! The proposed change to use the file name is a welcome one. Our old method was just the best workaround we could think of at the time. I think your method is much better. |
The driving change behind the switch was OAS3.1 support. Here are some reasons I can think of:
I would also guess that spectral has friendlier error messages since it's main use case is an OpenAPI design application. |
This seems promising! @ardatan Do you have any opinions on this? |
Personally I think OAS Validation shouldn't be part of the core library but CLI maybe? But if we want to have it, this library seems better than what we have right now :) |
@stoplightio/spectral supports openapi 3.1.0 while oas-validator does not.
One noteable drawback seems to be that @stoplight.spectral is much slower but seems to have caught thing even oas-validator didn't; such as operationRef syntax errors.