Skip to content

Invalid exclusiveMinimum, missing discriminator mapping, and suspicious integer bounds #549

Description

@achudnovskiy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions