{"generatedAt":"2026-07-19T03:01:59.542Z","tool":{"id":"openapi-to-typescript","name":"OpenAPI to TypeScript Generator","description":"Generate TypeScript types and API clients from OpenAPI 3.x specs — handles $ref, allOf, oneOf, discriminators","category":"converter","icon":"TS","keywords":["openapi","typescript","generator","swagger","types","api client","codegen","interface"],"remoteCallable":true,"remoteMode":"dedicated_api","riskClass":"H","maxInputBytes":524288,"timeoutMs":8000,"supportsStreaming":false,"url":"/openapi-to-typescript/","tags":["cli","converter","openapi"],"faqs":[{"question":"What OpenAPI versions are supported?","answer":"OpenAPI 3.0.x and 3.1.x in both JSON and YAML formats. Swagger 2.0 is not directly supported — convert it to OpenAPI 3.x first using the Swagger Editor."},{"question":"Does it handle $ref references?","answer":"Yes, all $ref references within the spec are resolved, including nested references and circular references (which generate type aliases to avoid infinite recursion)."},{"question":"Can I generate an API client?","answer":"Yes, optionally generate a typed fetch client with methods for each endpoint, properly typed path parameters, query parameters, request bodies, and response types."},{"question":"How does it handle oneOf/anyOf?","answer":"oneOf generates discriminated union types when a discriminator property is present, or plain union types otherwise. anyOf generates intersection types. allOf merges into a single interface."},{"question":"Can I paste YAML or JSON?","answer":"Both formats are accepted. The tool auto-detects whether your spec is YAML or JSON and parses accordingly."}],"howTo":[{"title":"Paste OpenAPI 3.x spec","description":"Input your OpenAPI/Swagger spec in JSON or YAML format. The tool parses components, paths, and request/response schemas."},{"title":"Select code generation options","description":"Choose interface-only types, full client stubs, or validation utilities. Pick between strict or lenient enum handling."},{"title":"Configure naming conventions","description":"Set naming style (camelCase, snake_case, PascalCase) for generated type and interface names."},{"title":"Generate TypeScript","description":"The tool creates .ts files with type definitions for all endpoints, request bodies, and response shapes. Ready for use with axios, fetch, or tRPC."},{"title":"Download bundle","description":"Export as a single .ts file or modular structure. Include optional validation utilities (Zod, io-ts) for runtime checks."}],"agentContract":{"toolId":"openapi-to-typescript","contractVersion":"2.0.0","remote_callable":true,"remote_mode":"dedicated_api","risk_class":"H","max_input_bytes":524288,"timeout_ms":8000,"supports_streaming":false,"preferred_surface":"dedicated_api","dedicated_api":{"baseUrl":"https://aidevhub.io/api/openapi-to-typescript/","openapiUrl":"https://aidevhub.io/api/openapi.yaml","endpoints":[{"method":"GET","path":"/api/openapi-to-typescript/","summary":"GET openapi-to-typescript"},{"method":"POST","path":"/api/openapi-to-typescript/","summary":"POST openapi-to-typescript"}],"riskClass":"H","inputMaxBytes":524288,"timeoutMs":8000},"runtime":{"endpoint":"/api/tools/run/","methods":["GET","POST"],"queryParams":[{"name":"toolId","required":true,"description":"Tool identifier"},{"name":"a","required":true,"description":"Primary input"}],"postBodyShape":{"toolId":"string","input":"{ a, b?, c?, mode? }"},"exampleGet":"https://aidevhub.io/api/tools/run/?toolId=openapi-to-typescript&a=...","policy":{"riskClass":"H","limit":10,"burst":5,"windowSec":60,"inputMaxBytes":524288,"timeoutMs":8000,"cacheTtlSec":0,"networkEnabled":false,"supportsStreaming":false}}},"relatedTools":[{"id":"json-to-typescript","name":"JSON to TypeScript Converter","url":"/json-to-typescript/","category":"converter"},{"id":"tailwind-converter","name":"CSS to Tailwind Converter","url":"/tailwind-converter/","category":"converter"},{"id":"html-to-jsx","name":"HTML to JSX Converter","url":"/html-to-jsx/","category":"converter"},{"id":"color-converter","name":"Color Converter","url":"/color-converter/","category":"converter"},{"id":"json-to-go","name":"JSON to Go Struct","url":"/json-to-go/","category":"converter"},{"id":"json-to-python","name":"JSON to Python Dataclass","url":"/json-to-python/","category":"converter"}]}}