@stuartshay/otel-types
v1.0.84
Published
TypeScript types for otel-demo API - Auto-generated from OpenAPI specification
Maintainers
Readme
@stuartshay/otel-types
TypeScript type definitions for the otel-demo API.
Auto-generated from the OpenAPI specification using openapi-typescript.
Installation
npm install @stuartshay/otel-typesUsage
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<LocationsResponse> {
const response = await fetch('https://otel.lab.informationcart.com/db/locations?limit=20');
return response.json();
}API Documentation
Full API documentation is available at:
- Swagger UI: https://otel.lab.informationcart.com/apidocs/
- OpenAPI Spec: https://otel.lab.informationcart.com/apispec.json
Versioning
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
Type Generation
Types are automatically generated when the otel-demo API schema changes.
To generate types locally:
# From otel-demo root
./scripts/generate-types.shRelated Packages
License
MIT
