OpenAPI 3.1 schema issues: invalid exclusiveMinimum, missing discriminator mapping, and suspicious integer bounds
I’m consuming the currently published OpenAI OpenAPI spec for my iOS/watchOS app using Swift OpenAPI Generator.
The spec currently requires a few local fixups before it can be consumed reliably.
Issues
1. Boolean exclusiveMinimum values are invalid in OpenAPI 3.1
The spec contains boolean exclusiveMinimum values, for example in numeric hyperparameter schemas:
minimum: 0
exclusiveMinimum: true
In OpenAPI 3.1, exclusiveMinimum follows JSON Schema semantics and must be a numeric value, not a boolean.
Expected shape:
This appears in multiple schemas.
2. seed uses suspicious integer bounds outside the signed 64-bit range
The seed property currently contains bounds like:
seed:
type: integer
minimum: -9223372036854776000
maximum: 9223372036854776000
These values are outside the signed 64-bit range:
Int64.min = -9223372036854775808
Int64.max = 9223372036854775807
For schemas intended to represent signed 64-bit integers, the bounds should be within that range.
Expected shape:
minimum: -9223372036854775808
maximum: 9223372036854775807
If this property is not intended to be constrained to signed 64-bit values, it would still be useful to confirm whether the current bounds are intentional. They look like rounded versions of the signed 64-bit minimum and maximum values.
3. RealtimeCreateClientSecretResponse.session discriminator is incomplete
#/components/schemas/RealtimeCreateClientSecretResponse/properties/session uses a discriminator:
oneOf:
- $ref: '#/components/schemas/RealtimeSessionCreateResponseGA'
- $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateResponseGA'
discriminator:
propertyName: type
The referenced schemas use discriminator values such as:
and:
Those values do not match the referenced schema names, so the discriminator should include an explicit mapping.
Expected shape:
discriminator:
propertyName: type
mapping:
realtime: '#/components/schemas/RealtimeSessionCreateResponseGA'
transcription: '#/components/schemas/RealtimeTranscriptionSessionCreateResponseGA'
Without the mapping, OpenAPI tooling cannot reliably resolve the oneOf branch from the discriminator value.
Out of scope
I’m not including Swift OpenAPI Generator-specific limitations here, such as its current handling of top-level webhooks. The issues above are about OpenAPI document correctness rather than tool-specific limitations.
OpenAPI 3.1 schema issues: invalid
exclusiveMinimum, missing discriminator mapping, and suspicious integer boundsI’m consuming the currently published OpenAI OpenAPI spec for my iOS/watchOS app using Swift OpenAPI Generator.
The spec currently requires a few local fixups before it can be consumed reliably.
Issues
1. Boolean
exclusiveMinimumvalues are invalid in OpenAPI 3.1The spec contains boolean
exclusiveMinimumvalues, for example in numeric hyperparameter schemas:In OpenAPI 3.1,
exclusiveMinimumfollows JSON Schema semantics and must be a numeric value, not a boolean.Expected shape:
This appears in multiple schemas.
2.
seeduses suspicious integer bounds outside the signed 64-bit rangeThe
seedproperty currently contains bounds like:These values are outside the signed 64-bit range:
For schemas intended to represent signed 64-bit integers, the bounds should be within that range.
Expected shape:
If this property is not intended to be constrained to signed 64-bit values, it would still be useful to confirm whether the current bounds are intentional. They look like rounded versions of the signed 64-bit minimum and maximum values.
3.
RealtimeCreateClientSecretResponse.sessiondiscriminator is incomplete#/components/schemas/RealtimeCreateClientSecretResponse/properties/sessionuses a discriminator:The referenced schemas use discriminator values such as:
and:
Those values do not match the referenced schema names, so the discriminator should include an explicit mapping.
Expected shape:
Without the mapping, OpenAPI tooling cannot reliably resolve the
oneOfbranch from the discriminator value.Out of scope
I’m not including Swift OpenAPI Generator-specific limitations here, such as its current handling of top-level
webhooks. The issues above are about OpenAPI document correctness rather than tool-specific limitations.