Skip to main content

Each OpenAPI document keeps its schema dialect

OpenAPI 3.0 and 3.1+ write schemas differently. Apiome now keeps the dialect each document and schema declares. It lists every rewrite it makes when you export to another version.

  • Kept on import: the document's jsonSchemaDialect, or a schema's own $schema, is recorded. The JSON Schema Apiome builds for validation names the dialect it was converted from.
  • Listed on export: 3.0 to 3.1 or 3.2 rewrites nullable and boolean exclusiveMinimum / exclusiveMaximum, and lists each rewritten schema. A nullable beside a $ref, which 3.0 ignored, is listed as a loss.
  • Back to 3.0: a nullable 3.0 schema that was upgraded comes back as nullable: true, not as an anyOf. A declared dialect such as draft-07 that 3.0 cannot hold is named in the report.
  • $dynamicRef and $anchor are kept at 3.1 and 3.2, and listed as dropped at 3.0.
  • Measured: every 3.0 document in the construct corpus goes 3.0 → 3.1 → 3.2 → 3.0 with every change listed.

See Understand export fidelity.