Skip to main content

Module check

Module check 

Source
Expand description

check: validate the app, its models and its configuration without starting a server or opening a database.

check returns every CheckIssue it finds. The checks, by id prefix:

PrefixChecks
configa default database exists when models are managed; database URLs parse and name a known scheme
modelsduplicate tables, models and columns; a primary key; foreign-key and many-to-many targets are registered models
migrationsmigration files load; the dependency graph is sound; model changes not yet in a migration
openapithe OpenAPI document generates (duplicate operations and ids)
backendthe models fit the capabilities of the default database’s backend

Issue messages never contain database URLs.

Structs§

CheckIssue
One problem found by check.

Enums§

CheckLevel
How serious a CheckIssue is.

Functions§

check
Run every check.
check_build
Check that app can be turned into a router, which catches duplicate routes and malformed path templates that the OpenAPI check does not see (for example hidden endpoints). Consumes the app: call it on a fresh one.
has_errors
Whether any of issues is an error.