OpenAPI from JSON

Input
Output

OpenAPI Generator from JSON

Paste one sample response or request body and get an OpenAPI 3.1 document for that endpoint. The path's {id} parts and ?query values become parameters, and every nested object becomes its own named schema under components, ready to grow into a full spec.

How do I use the OpenAPI from JSON?

  1. Paste a sample response, such as GET /orders/{orderId}, or a request body.
  2. Set the path and method, and say whether the sample is the response, the request body or both.
  3. Copy the YAML or JSON into your spec, or save it.

What does the OpenAPI from JSON do?

  • OpenAPI 3.1 with JSON Schema 2020-12
  • Path parameters from {id} and query parameters with types from ?page=1
  • Nested objects as named schemas: customer becomes Customer, items becomes Item
  • Formats like date-time, email, uri and uuid spotted in the sample
  • The sample kept as the example
  • YAML or JSON

Frequently asked questions

Does it write the whole API?
It writes one endpoint from one sample. Run it for each endpoint and merge the paths and schemas into one file.
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 2.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram