Skip to main content

Troubleshooting

Generated document is stale

getOpenApiObject() caches the document after the first call and after the automatic onBeforeBoot refresh. If you register new OpenAPIHooks parsers or routes at runtime, the cached document will not reflect them until you call cacheOpenAPIObject() (or Module.onReset()/a full bootstrap restart, which clears the cache via clearOpenApiCache()).

Docs endpoints return 404 / are not exposed

@quik/openapi only registers the IQApiDocs feature and parser hooks — the actual HTTP endpoints that serve the OpenAPI/Swagger UI/Scalar documents (and the docs.expose, docs.endpoints.*, docs.security.* config that gates them) belong to @quik/http. If a docs route is missing, check that module's configuration and that @quik/http-express (or another HTTP engine) is registered.

Swagger UI rejects the generated document

Some security schemes (e.g. the custom webauthn HTTP scheme registered by @quik/passport) are not supported by Swagger UI. Serve getApiDocs().getApiJson({ mode: 'swagger-ui' }) to Swagger UI instead of the raw getOpenApiObject() output — it projects out unsupported security schemes while preserving endpoint descriptions.

Common Errors

@quik/openapi has no locale file and defines no typed QTranslatableError subclasses of its own — there is no "Common Errors" table for this module.