-
Notifications
You must be signed in to change notification settings - Fork 270
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
Run checks on Django startup #477
Comments
Hi, that's a very nice idea. it definitely can make sense to run these tests on startup. however, i'm not sure we can turn off the warning when actually retrieving the schema. there are quite a few use-cases where schema generation can be fine when generated "offline" (checks/CLI) while "online" generation (request) has warnings. |
GJ! |
This kinda broke our environment. We have 2 kinds of APIs in our project - public and internal. We're using annotations to define them and handle this logic in We've fixed all our Public APIs (hopefully) and care when drf-spectacular gives us a warning / error regarding them. We don't really care about these errors for This task currently raises this exceptions for our Is there any way to override with some logic, for which endpoints these checks are run ? |
Hi @HansAarneLiblik, sry for the inconvenience. i fixed some bugs and added a switch to turn this off, which will be released in this will turn off the new check. i would suggest just doing that and carrying on as you always did as nothing else changed. your special case is not really applicable here, but you can still do
alternatively you can set the Django setting
which has the same outcome. |
Sometimes when working with a swagger docs I see lots of warnings about incorrect schema in the console. It would be great to run whose checks on Django startup using checks framework.
The text was updated successfully, but these errors were encountered: