Migrating from OpenAPI 3.0 to 3.1

JSON Schema 2020-12 alignment, nullable arrays, and top-level webhooks under ADP-040.

Breaking syntax shifts in 3.1

Update these fields when changing the top-level version to 3.1.0.

FeatureOpenAPI 3.0.xOpenAPI 3.1.0Rule
Nullable typesnullable: truetype: ["string", "null"]ADP-038
Exclusive minimumexclusiveMinimum: true + minimumexclusiveMinimum: 0ADP-034
ConstantsSingle-item enumconst: "v1"ADP-032
Async webhook eventsAd-hoc callbacks or markdown docsTop-level webhooks: mapADP-040
Ownership metadatainfo.contact, info.licenseAdds info.summary + SPDX identifierADP-033

Top-level webhook declaration

openapi: 3.1.0
webhooks:
  orderPaid:
    post:
      operationId: onOrderPaid
      summary: Emitted when order settlement finishes

Validate 3.0 and 3.1 side by side

api_validator.py validates both OpenAPI 3.0.x and 3.1.0 specs in JSON or YAML via the Browser Validator.