Shared API contract for Lightmill logging endpoints.
This package exposes:
openAPI: generated OpenAPI document object.routes: route-level request/response schemas.- JSON:API server error schemas from
server-errors. openapi.yamlexport for tooling/code generation.
npm install @lightmill/log-apiimport { openAPI, routes } from '@lightmill/log-api';
console.log(openAPI.info.title);
console.log(Object.keys(routes));import specPath from '@lightmill/log-api/openapi.yaml';Or via CLI tools:
openapi-typescript node_modules/@lightmill/log-api/dist/openapi.yaml --output ./types.tsOpenAPI 3.1 document object generated from route schemas.
Map of route definitions keyed by path and method. Useful for server integration and type-safe handler validation.
The package root re-exports server-errors members such as:
RequestValidationErrorResponseNotFoundErrorResponseInternalServerErrorResponseMethodNotAllowedErrorResponseUnsupportedMediaTypeErrorResponseSessionRequiredErrorResponseServerErrorResponse
These schemas are useful when validating server responses and documenting errors consistently.