-
Notifications
You must be signed in to change notification settings - Fork 18
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
When doing linting OpenAPI specification it produces invalid error message #70
Comments
I'm not sure I follow. #403 is about invalid schemas, but you are saying that valid OpenAPI can still produce this error message? Got an example OpenAPI file you could give us to reproduce this? |
Hi @philsturgeon sorry for slow response.
However, when we run lint against OpenAPI which references schemas, we get error
It would be great if you can help me understand errors in schemas or OpenAPI so I can fix them. |
We've figured out a workaround for making the AJV error output more useful for most use cases: stoplightio/spectral#1071 Please let us know if it's still a problem. |
Thanks for taking a look at this! I've done the following:
I see no problem with this JSON schema file, see https://github.com/maasglobal/maas-schemas/blob/develop/maas-schemas/schemas/core/components/travel-mode.json Could I am using it wrong? |
It's valid JSON Schema, but it's not valid OpenAPI. If specs/booking.yml is OpenAPI then you cannot $ref to proper JSON Schema files, only OpenAPIish Schema Objects. This is the bane of my existence, and is being resolved in OpenAPI v3.1. https://www.apisyouwonthate.com/blog/openapi-v31-and-json-schema-2019-09 |
OpenAPI specification checked by using spectral linter.
However due to bugs in spectral linter (see stoplightio/spectral#403) perfectly valid OpenAPI specifications might produce errors if use externally defined JSON Schema type definitions.
This issue can not be fixes until stoplightio/spectral#403 fixed.
The text was updated successfully, but these errors were encountered: