Skip to content

OpenAPI Specification

The complete OpenAPI 3.1 specification for the Neemias API is available in JSON format. It is automatically generated from source code (Worker routes and Zod schemas) and covers all 25 endpoints and 29 API schemas.

Viewing the specification

  • openapi.json — complete OpenAPI 3.1 specification JSON file
  • Swagger Editor — load the openapi.json file in Swagger Editor for interactive visualization

Regenerating the spec

bash
pnpm docs:openapi

The generation script:

  1. Reads workers/src/router.ts and extracts all 25 routes
  2. Validates that each route has a registry entry (scripts/openapi-registry.ts)
  3. Converts Zod schemas to JSON Schema via zod-to-json-schema
  4. Writes docs/reference/api/openapi.json and docs/public/reference/api/openapi.json

If a new route is not documented in the registry, the build fails (pnpm docs:build).

API Information

  • Base URL (production): https://api.neemias.app/api/v1
  • Base URL (local): http://localhost:8788/api/v1
  • Authentication: Bearer token JWT (HS256) obtained via POST /auth/login
  • Format: JSON

Source: docs/reference/api/openapi.json

Distributed under MIT License.