Skip to main content

JSON to OpenAPI Schema

New

Generate an OpenAPI Schema Object from JSON data.

convertopenapischema
Read the guide
Shortcuts:⌘ KSearch

Frequently Asked Questions

Why did one field end up optional in the generated schema?

This tool marks a property as required only when it shows up in every sampled object at that level and its inferred shape is not nullable. If you paste an array of objects, it merges the item shapes first, so missing keys in any item make that field optional.

What does the OpenAPI 3.1 style toggle actually change?

Without the toggle, nullable fields use the older OpenAPI style like "nullable": true. With it on, the tool switches to 3.1-style type arrays such as ["string", "null"] whenever it can.

Why did my mixed array produce a very loose items schema?

Array items are inferred by merging every item shape together. Integer and number collapse to number, but unrelated mixes like object + string become a generic schema object with little or no type information.

Does this generate a full OpenAPI document with paths and components?

No. It only generates a Schema Object plus the title you enter. You will not get paths, responses, operation objects, or a components wrapper from this tool.

Why are nested objects inlined instead of split into reusable refs?

The generator builds one self-contained schema tree. It creates unique internal names while inferring shapes, but the final output is still inline JSON schema rather than $ref-based components.

Related Tools