Skip to main content

spec_json

Function spec_json 

Source
pub fn spec_json() -> String
Expand description

The generated OpenAPI 3 document as pretty-printed JSON — the same bytes served live at GET /api/openapi.json, but obtainable without a running server or database (the spec is built purely from the route definitions). This is what cortex openapi prints and what the published docs site (scripts/build-docs-site.sh) bundles, so the static docs stay in lock-step with the served API.