Skip to content

API Reference ​

The Neemias API follows the contract defined below. The OpenAPI 3.1 specification is automatically generated from the code and validated against the Workers routes.

Documents ​

DocumentDescription
API ContractComplete textual contract — endpoints, auth, idempotency, errors, conflicts
Features & EndpointsTodos os endpoints HTTP da API (102 operações em 82 caminhos), agrupados por domínio e mapeados às funcionalidades — gerado de workers/src/routes/registry.ts via pnpm docs:endpoints
OpenAPI 3.1 SpecificationGuia da especificação OpenAPI — como consultar, regenerar e usar no Swagger Editor
OpenAPI 3.1 Spec (JSON)Spec automatically generated via pnpm docs:openapi. 82 paths, 102 operations
TypeDocDocumentação de API gerada automaticamente via TypeDoc — schemas, permissões, workers

Regenerating the spec ​

bash
pnpm docs:openapi

The script:

  1. Reads workers/src/routes/registry.ts and extracts every route (102 operations across 82 paths)
  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, pnpm docs:build fails.

Consuming the API ​

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

Distribuído sob licença MIT.