Skip to main content

Upgrade Swagger 2.0 and OpenAPI 3.0 specs to 3.1 or 3.2

A version's row menu now has Upgrade OpenAPI version…. It plans the move from Swagger 2.0, OpenAPI 3.0 or 3.1 to OpenAPI 3.0, 3.1 or 3.2, lists every change, and applies it as a new version.

  • Plan first: the dialog shows a count per rule and every change, grouped by hop (2.0 → 3.0, 3.0 → 3.1, 3.1 → 3.2), each with the JSON Pointer it touched. A change that may alter the document's meaning — nullable next to a $ref, a collectionFormat with no OpenAPI 3 style, an assumed https server — is marked Review.
  • Then apply: Apply as new version imports the upgraded document as a new version of the same project or catalog item, under the label you choose. If the version changed after you reviewed the plan, the upgrade is refused.
  • What changes: Swagger 2.0 structure moves to OpenAPI 3 (servers, components, requestBody, response content, style / explode), keeping every x- extension; 3.0 schemas move to JSON Schema 2020-12 (nullable → type arrays, numeric exclusive bounds, example → examples). 26 rules in all.
  • Everywhere: apiome upgrade FILE --to 3.2 --output out.yaml, apiome upgrade --project P --to 3.2 --apply, and POST /v1/openapi-upgrade/{tenant}/plan / …/apply in the REST API.
  • Measured: on the OpenAPI construct corpus, a 3.0 document upgraded to 3.1 or 3.2 and exported back at 3.0 matches the original, apart from no-op keywords the plan lists.

See Upgrade a spec to a newer OpenAPI version.