-
Notifications
You must be signed in to change notification settings - Fork 246
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
Q: What is the purpose of '--validate' flag? #1175
Comments
So Spectacular has two kinds of messages: warnings and errors. Warnings are minor issues found, and errors denote a bit more severe issue like a whole endpoint not being processable. Think of it as message "severity". By default, spectacular will not raise errors (non-zero code). However, if you want your generation to fail if a warning or error is produced, you add Both flags are meant to be used with CI/CD, so they should return a non-zero code if their requirements are not met. |
@tfranzel thank you for the clarification! I was wondering if it will be a good cause to put it in the docs. What do you think? I have not really found a suitable place though... I believe the least effort would be is to update management command
|
Hello! I was unable to find any information in regards to
--validate
command option. What does it do exactly?Initially, I thought it was meant to trigger a non-zero exit code on
errors
in schema generation, but it was not the case (why?). Only--fail-on-warn
resulted in a erroneous code.I want to use schema generation in my CI/CD and, after comparing warnings and errors, I have decided to only account for errors, since they have appeared to be more significant to my schema.
The text was updated successfully, but these errors were encountered: