-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
feature request: Hide AJVs "unknown format" complaints #396
Comments
Hey there, this related to ajv-validator/ajv#466 in which the author of AJV makes it very clear that people should be aware of unknown formats. I would like to try and hide these specific messages because you are correct, the OAS spec does say you can use whatever you want. |
Hey folks, now reading through that issue @philsturgeon linked to and the maintainer has a valid point.
I see three possible solutions:
|
If you'd like to try and find a way to convert these CLI outputs to spectral warnings then that's ok, but JSON Schema allows unknown formats so we should not shove all this stuff into the CLI when unknown formats are discovered. 🤷♂ A large part of the problem here, and something this issue is aiming to address, is that these are shoved into the console outside of normal spectral logic, so --quiet isnt helping get rid of them. |
Oh, interesting, that's a forth solution which I haven't thought about. Good idea. Ok, will play around with this stuff and see where I can take it. |
Maybe spike on it and see how far you get. The primary goal is to get the AJV format moaning out of the console, and maybe a follow up feature could be to have those format messages converted to spectral warnings or info :) |
yo, created a PR, please take a look if that's sufficient. |
Sounds good. Had a quick look and surfacing it at the spectral messages level will require some more work. |
Describe the bug
According to the spec,
format
is is an open string-valued property, and can have any value.Spectral generates (pollutes?) stdout with warnings about "unknown format"s.
To Reproduce
repro/output.openapi.yaml
Run
repro/log.txt
Expected behavior
Nothing in stderr/stdout
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: