openai / openai/openai-openapi
Invalid exclusiveMinimum, missing discriminator mapping, and suspicious integer bounds
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
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:
exclusiveMinimum: 0
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:
"type": "realtime"
and:
"type": "transcription"
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the published OpenAPI document for boolean exclusiveMinimum values and the seed schema, then inspect #/components/schemas/RealtimeCreateClientSecretResponse/properties/session. Done means numeric exclusiveMinimum values, signed 64-bit-compatible seed bounds, and an explicit realtime/transcription discriminator mapping are present throughout the document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100