OpenAPI 3.0 ↔ 3.1 Converter
OpenAPI 3.0 ↔ 3.1 Converter: Updates root version to 3.1.0 and converts legacy OpenAPI 3.0 `nullable: true` to `type: [string, 'null']`.
About this openapi 3.0 ↔ 3.1 converter
Updates root version to 3.1.0 and converts legacy OpenAPI 3.0 `nullable: true` to `type: [string, 'null']` Validates and converts interface schemas client-side without transmitting private endpoint specifications.
API contract & interface schema logic
Recursively converts supported OpenAPI 3.0 and 3.1 document fields: it replaces `nullable: true` with a type containing `null`, reverses null-containing type arrays for 3.0, and rewrites supported boolean exclusive bounds paired with numeric bounds. It is a selected-field conversion, not complete OpenAPI or JSON Schema validation.
Worked schema conversion scenario
Scenario: Upgrade a minimal JSON OpenAPI document to the default 3.1 target.
Sample input:
Processing: Set the root version to 3.1.0 and add the fixed Draft 2020-12 dialect.
Illustrative output:
Schema version & syntax constraints
Input must be valid UTF-8 text smaller than 10,000,000 bytes. These mappings are limited; the report does not prove complete OpenAPI conformance or validate the document.
API specifications and schema models in OpenAPI 3.0 ↔ 3.1 Converter reflect OpenAPI and JSON Schema standards. Verify generated schemas against your runtime validator.
Client-side schema processing boundary
Schema analysis and protocol mapping in OpenAPI 3.0 ↔ 3.1 Converter execute locally in the browser tab without uploading endpoint definitions.
OpenAPI Specification & JSON Schema standards
OpenAPI Specification standards and JSON Schema draft definitions:
OpenAPI 3.0 ↔ 3.1 Converter verification · Audit standards
How to use it
- Paste an OpenAPI JSON or YAML document, then choose target version 3.0 or 3.1.
- Convert supported nullable/type, tuple prefixItems/items, and schema example/examples forms; inspect the separate migration report for breaking changes, unsupported cases, and manual confirmation prompts.
- Copy the converted document and migration difference report separately.
Frequently asked questions
How does OpenAPI Version Converter choose a target?+
Choose OpenAPI 3.0 or 3.1 with the target-version selector. The converter supports documents whose declared source version is 3.0.3 or 3.1.0. JSON input returns formatted JSON and YAML input returns YAML.
Can you show an input and its result?+
A JSON document with `openapi: 3.0.3` becomes `openapi: 3.1.0` and gains `jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema`. the documented example verifies these two fields, not full specification validity.
Which schema changes and reports are supported?+
Within Schema Objects, the limited mapper handles nullable/type and exclusive bounds, maps 3.0 tuple items to 3.1 prefixItems and back, and moves a single schema example between example and examples. The JSON report lists changes, potentially breaking or unsupported cases, and manual confirmation prompts. It does not claim full OpenAPI conformance.
What does it not migrate or validate?+
It requires valid UTF-8 input under 10,000,000 bytes. It does not validate documents, resolve references, preserve YAML comments or aliases, or cover every OpenAPI difference. Unsupported or lossy schema mappings are listed for manual review.
