OpenAPI / Swagger
PDF Server generates a Swagger 2.0 specification describing the render, schema, and examples endpoints for the templates that are actually loaded — so the spec reflects your specific deployment.
Live spec
curl http://localhost:9999/spec/swagger.json
The server also serves interactive viewers from its static assets (Swagger UI, Redoc, and Scalar), pointed at the live spec. Open the server root and navigate to them.
What the spec contains
For each loaded template the spec includes:
POST /templates/<name>/render— with the template's JSON Schema as the body parameter when aschema.jsonis present;GET /templates/<name>/schema.json— when a schema exists;GET /templates/<name>/examples-dataand oneGET /templates/<name>/examples/<example>per example — when examples exist;POST /templates/<name>/preview/render-plan— for composite templates;- the
/_statusroute; POST /_debug/templates/<name>/renderandGET /_debug/templates/<name>/examples/<example>(both returnapplication/x-tarcontaining the requested artifacts followed bymanifest.json, named by aContent-Dispositionheader so downloaded bundles do not collide, no server state; a template name that cannot be used as a bundle path is a 400. The archive is streamed as it is produced and never assembled in memory, somanifest.json— which describes every artifact — is necessarily the last entry, and its presence is what tells a complete bundle from an abandoned one. A render that fails is still a bundle and still a200: it carries the problems that say why, and its manifest lists the artifacts the browser would have produced asunavailablewith the render error as their reason),GETandPOST /_debug/templates/<name>/html(GETfor a data-less preview,POSTwith the render data as the JSON request body — never a query parameter, so render data never lands in a trace span or a proxy log), andGET /_debug/templates/<name>/assets/<path>(one file from the template'sassets/directory, so a consumer previewing that HTML can resolve the links it carries; served withX-Content-Type-Options: nosniff,Content-Security-Policy: sandboxandAccess-Control-Allow-Origin: *, which is what lets an isolated, opaque-origin preview frame load a font) — listed in/spec/swagger.jsonand mounted only when the server is started with--debug-enabled; absent from both the spec and the router otherwise; see Template structure.
On this documentation site
The site build can dump the spec from a server running against the example templates and render it here with a viewer. Because the spec is deployment-specific, the version shown corresponds to the example template set. See Build & CI for the generation step.
Swagger 2.0 is accepted by Scalar, Swagger UI, and Redoc directly. If a tool requires OpenAPI 3, convert with
swagger2openapiin your pipeline.