OpenAPI Spec
Auto-generated OpenAPI 3.1 specification from your Quickback definitions.
The compiler generates an OpenAPI 3.1 specification from your feature definitions. By default it's both written to openapi.json at your project root and served as a runtime route.
Endpoint
GET /openapi.jsonReturns the full OpenAPI spec as JSON.
curl https://your-api.example.com/openapi.jsonWhat's included
The generated spec documents every route the compiler produces:
- CRUD endpoints (list, get, create, update, delete)
- Batch operations
- Views
- Actions (including standalone actions)
- Auth routes (
/api/auth/**) - Storage, embeddings, and webhook routes (when configured)
Each endpoint includes request/response schemas derived from your Drizzle column types, access control metadata, and error responses.
Configuration
Both generation and publishing default to true. You can control them independently in quickback.config.ts:
export default defineConfig({
name: "my-app",
// ...
openapi: {
generate: true, // write openapi.json to project root
publish: true, // serve GET /openapi.json at runtime
},
});| Option | Default | Description |
|---|---|---|
generate | true | Write openapi.json to the project root during compilation |
publish | true | Serve the spec at GET /openapi.json (requires generate: true) |
Omitting the openapi key entirely is equivalent to both being true.
Generate only (no runtime route)
openapi: {
generate: true,
publish: false,
}The file is still written so you can use it in CI or commit it to your repo, but no route is added to the app.
Disable entirely
openapi: {
generate: false,
}No file is written and no route is served.
Usage with tools
Import into Postman
- Open Postman and click Import
- Paste the URL
https://your-api.example.com/openapi.jsonor upload the file - Postman creates a collection with every endpoint pre-configured
Generate a typed client
Use openapi-typescript to generate TypeScript types from the spec:
npx openapi-typescript https://your-api.example.com/openapi.json -o src/api.d.tsSwagger UI
Point any OpenAPI-compatible viewer at the endpoint:
https://petstore.swagger.io/?url=https://your-api.example.com/openapi.jsonExample output (excerpt)
{
"openapi": "3.1.0",
"info": {
"title": "my-app API",
"version": "1.0.0"
},
"paths": {
"/api/v1/todos": {
"get": {
"summary": "List todos",
"operationId": "listTodos",
"parameters": [
{ "name": "limit", "in": "query", "schema": { "type": "integer" } },
{ "name": "offset", "in": "query", "schema": { "type": "integer" } }
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": { "type": "array", "items": { "$ref": "#/components/schemas/Todo" } }
}
}
}
}
}
}
}
}
}
}