TypeScript types for otel-demo API - Auto-generated from OpenAPI specification
npm install @stuartshay/otel-typesTypeScript type definitions for the otel-demo API.
Auto-generated from the OpenAPI specification using openapi-typescript.
``bash`
npm install @stuartshay/otel-types
`typescript
import type { paths, components } from '@stuartshay/otel-types';
// Use path types
type LocationsResponse = paths['/db/locations']['get']['responses']['200']['content']['application/json'];
// Use component schemas
type Location = components['schemas']['Location'];
// Example with fetch
async function getLocations(): Promise
const response = await fetch('https://otel.lab.informationcart.com/db/locations?limit=20');
return response.json();
}
`
Full API documentation is available at:
- Swagger UI:
- OpenAPI Spec:
This package follows the otel-demo API versioning:
- Package version matches the Docker image version
- Breaking API changes result in a major version bump
- New endpoints or optional fields result in a minor version bump
- Bug fixes result in a patch version bump
Types are automatically generated when the otel-demo API schema changes.
To generate types locally:
`bash``From otel-demo root
./scripts/generate-types.sh
- otel-demo - The Flask API
- otel-ui - React frontend (coming soon)
MIT