OpenAPI to TypeScript

Input
Output

OpenAPI to TypeScript

Paste an OpenAPI document to get a type for every schema under components (or definitions in Swagger 2), with references between them kept as named types.

How do I use the OpenAPI to TypeScript?

  1. Paste the OpenAPI document as JSON or YAML.
  2. Pick the language.
  3. Copy the types into your client or server code.

What does the OpenAPI to TypeScript do?

  • OpenAPI 3.0 and 3.1, and Swagger 2
  • JSON or YAML
  • Every component schema, in an order that compiles
  • nullable: true and 3.1's type lists
  • allOf compositions merged
  • Zod, TypeBox, Valibot and Yup validators too

Frequently asked questions

Does it write an API client?
No, only the data types (models). Use them with fetch, axios or your client generator.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has more than 65 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut. About · Privacy policy
Last updated · Version 4.9 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram