There are two ways to generate an OpenAPI spec in Django Rest Framework: CLI
command and API endpoint.
How it works
The actual spec is produced by an underlying generator class, called by either a
CLI command or an API endpoint. Long story short: generator collects the project
endpoints from