Upgrading FastAPI or Springdoc to emit OpenAPI 3.1.0 often breaks existing TypeScript and Zod generators silently—fields start typing as unknown , or runtime validation rejects valid null payloads. Because OpenAPI 3.1 aligned directly with JSON Schema Draft 2020-12, three schema constructs changed shape.
1. nullable: true Was Replaced by Type Arrays
OpenAPI 3.0 used { "type": "string", "nullable": true } . OpenAPI 3.1 drops nullable in favor of standard JSON Schema { "type": ["string", "null"] } (or anyOf ). Older 3.0-only generators miss the array form and omit .nullable() in generated Zod schemas.
2. exclusiveMinimum / exclusiveMaximum Changed From Boolean to Number
In 3.0, minimum: 0 paired with exclusiveMinimum: true . In 3.1, exclusiveMinimum: 0 carries the numeric bound directly. Validators expecting booleans either ignore the bound or produce NaN checks.
3.…