Commit graph

4 commits

Author SHA1 Message Date
rimskij
a4fc2df4ea feat: add TypeScript generation options to generate-types tool
Add configurable options for customizing TypeScript output:
- enumAsUnion/enumAsEnum: control enum generation style
- interfacePrefix/interfaceSuffix: naming conventions for interfaces
- indentation: 2 spaces, 4 spaces, or tab

Includes validation for mutually exclusive options and valid
TypeScript identifier prefixes/suffixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 15:42:39 +01:00
rimskij
c978f9c313 fix: sanitize .NET-style schema names for valid TypeScript
- Handle fully qualified names (Namespace.Type -> Type)
- Handle generics (Type\`1[Inner] -> Type_Inner)
- Preserve original name in JSDoc comment
- Tested with Moravia Symfonie API (185 schemas)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-12 15:04:00 +01:00
rimskij
409194781e fix: graceful fallback for specs with broken $refs
- parseSpec now tries dereference first, falls back to parse on failure
- Shows warning when spec has broken references
- Tested with Moravia Symfonie API (293 paths, 381 operations)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-12 14:55:26 +01:00
rimskij
cc789d3b32 feat: initial MCP server for OpenAPI/Swagger parsing
- Parse and validate OpenAPI 3.x / Swagger 2.0 specs
- Query endpoints by method, path pattern, tag, operationId
- Get component schema details
- Generate TypeScript interfaces from schemas
- Support local files and remote URLs

Tools: parse-spec, validate-spec, query-endpoints, get-schema, generate-types

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-12 14:33:10 +01:00