Quickback Docs

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.json

Returns the full OpenAPI spec as JSON.

curl https://your-api.example.com/openapi.json

What'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
  },
});
OptionDefaultDescription
generatetrueWrite openapi.json to the project root during compilation
publishtrueServe 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

  1. Open Postman and click Import
  2. Paste the URL https://your-api.example.com/openapi.json or upload the file
  3. 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.ts

Swagger UI

Point any OpenAPI-compatible viewer at the endpoint:

https://petstore.swagger.io/?url=https://your-api.example.com/openapi.json

Example 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" } }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

On this page