"""Dump the OpenAPI schema to stdout without starting a server.

Run in the image build so the TypeScript client is generated from the live schema
rather than hand-written. Importing `app.main` must therefore stay safe with no
database and no BW client configured.

    python -m app.openapi_dump > openapi.json
"""

import json

from app.main import app

if __name__ == "__main__":
    print(json.dumps(app.openapi()))
