Skip to content

Conversation

@vultron81
Copy link

Summary

  • Add scripts to generate OpenAPI 3.0 specification from SDK TypeScript types
  • Add validation script to ensure spec matches SDK endpoints
  • Add Spectral linting configuration for OpenAPI best practices

New Files

  • scripts/generate-openapi.ts - Parses SDK types and generates OpenAPI 3.0 spec
  • scripts/validate-openapi.ts - Validates generated spec against SDK endpoints
  • scripts/tsconfig.scripts.json - TypeScript config for scripts
  • scripts/README.md - Documentation for usage
  • .spectral.yaml - Spectral linting rules

Usage

npm run generate:openapi  # Generate openapi.yaml
npm run validate:openapi  # Validate against SDK
npm run lint:openapi      # Lint the spec

Test plan

  • Run npm run generate:openapi - generates valid OpenAPI 3.0 spec
  • Run npm run validate:openapi - validates 64 paths, 109 schemas
  • Run npm run lint:openapi - passes with 0 errors

🤖 Generated with Claude Code

- Add scripts/generate-openapi.ts to generate OpenAPI 3.0 spec from SDK types
- Add scripts/validate-openapi.ts to validate spec against SDK endpoints
- Add .spectral.yaml for OpenAPI linting configuration
- Add npm scripts: generate:openapi, validate:openapi, lint:openapi
- Add documentation in scripts/README.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant