Skip to content

error: openapi.yaml can't pass the openapi-generator-cli validate #453

Open

Description

@Lfan-ke

openai-api$ openapi-generator-cli validate -i openapi.yaml
Validating spec (openapi.yaml)
[main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for null. Default to String.
[main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for null. Default to String.
[main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for null. Default to String.
[main] ERROR o.o.codegen.utils.ModelUtils - Undefined array inner type for null. Default to String.
Errors:
- attribute components.schemas.EvalScoreModelGrader.max_items is unexpected
- attribute components.schemas.TranscriptTextDeltaEvent.items is missing
- attribute components.schemas.Eval.default is not of type array
- attribute components.schemas.TranscriptionInclude.default is not of type string
- attribute components.schemas.ChatCompletionStreamOptions.default is not of type object
- attribute components.schemas.RealtimeSessionCreateRequest.default is not of type object
- attribute components.schemas.VectorStoreFileAttributes.propertyNames is unexpected
- attribute components.schemas.CreateTranscriptionResponseJson.optional is unexpected
- attribute components.schemas.RealtimeSession.default is not of type object
- paths.'/organization/certificates/{certificate_id}'. Declared path parameter
certificate_id needs to be defined as a path parameter in path or operation level
- attribute components.schemas.TranscriptTextDoneEvent.items is missing
- attribute components.schemas.RealtimeTranscriptionSessionCreateRequest.default is not of
type object
- attribute components.schemas.CompoundFilter.$recursiveRef is unexpected
- paths.'/organization/projects/{project_id}/certificates/activate'. Declared path parameter
project_id needs to be defined as a path parameter in path or operation level
- paths.'/organization/projects/{project_id}/certificates'. Declared path parameter
project_id needs to be defined as a path parameter in path or operation level
- attribute components.schemas.EvalScoreModelGrader.min_items is unexpected
- attribute components.schemas.CompoundFilter.$recursiveAnchor is unexpected
- attribute components.schemas.CreateChatCompletionRequest.default is not of type object
- attribute components.schemas.CreateCompletionRequest.default is not of type object
- paths.'/organization/projects/{project_id}/certificates/deactivate'. Declared path
parameter project_id needs to be defined as a path parameter in path or operation level
Warnings:
- Unused model: RealtimeServerEventResponseDone
- Unused model: OutputAudio
- Unused model: MessageDeltaContentTextObject
- Unused model: RealtimeServerEventResponseOutputItemAdded
- Unused model: RunStepDeltaStepDetailsToolCallsFunctionObject
- Unused model: RealtimeClientEventSessionUpdate
- Unused model: RealtimeServerEventConversationItemInputAudioTranscriptionFailed
- Unused model: FineTunePreferenceRequestInput
- Unused model: RunStepDeltaStepDetailsToolCallsFileSearchObject
- Unused model: ModelIds
- Unused model: RealtimeConversationItem
- Unused model: BatchRequestOutput
- Unused model: RealtimeServerEventResponseOutputItemDone
- Unused model: RealtimeServerEventResponseTextDelta
- Unused model: RealtimeServerEventConversationItemInputAudioTranscriptionCompleted
- Unused model: BatchRequestInput
- Unused model: LogProbProperties
- Unused model: RealtimeClientEventInputAudioBufferClear
- Unused model: RealtimeServerEventInputAudioBufferCleared
- Unused model: RealtimeResponseCreateParams
- Unused model: RealtimeServerEvent
- Unused model: RealtimeServerEventConversationCreated
- Unused model: RealtimeServerEventError
- Unused model: RunStepDeltaStepDetailsMessageCreationObject
- Unused model: RealtimeClientEventConversationItemCreate
- Unused model: ChatCompletionRole
- Unused model: ErrorEvent
- Unused model: MessageDeltaContentImageUrlObject
- Unused model: RunStepDeltaStepDetailsToolCallsObject
- Unused model: RealtimeClientEventConversationItemRetrieve
- Unused model: RealtimeClientEventInputAudioBufferCommit
- Unused model: RealtimeServerEventOutputAudioBufferCleared
- Unused model: RealtimeClientEventConversationItemTruncate
- Unused model: MessageDeltaContentTextAnnotationsFilePathObject
- Unused model: RealtimeServerEventInputAudioBufferCommitted
- Unused model: RealtimeClientEventInputAudioBufferAppend
- Unused model: RealtimeServerEventConversationItemCreated
- Unused model: RealtimeServerEventTranscriptionSessionUpdated
- Unused model: RunStepDeltaObject
- Unused model: AssistantStreamEvent
- Unused model: RunStepDeltaStepDetailsToolCallsCodeObject
- Unused model: ThreadStreamEvent
- Unused model: RealtimeServerEventResponseTextDone
- Unused model: Content
- Unused model: DoneEvent
- Unused model: RealtimeServerEventInputAudioBufferSpeechStarted
- Unused model: MessageDeltaContentRefusalObject
- Unused model: RealtimeServerEventResponseContentPartDone
- Unused model: RealtimeServerEventConversationItemRetrieved
- Unused model: RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
- Unused model: RealtimeClientEventResponseCancel
- Unused model: RealtimeServerEventResponseCreated
- Unused model: MessageDeltaObject
- Unused model: RealtimeServerEventResponseAudioTranscriptDone
- Unused model: RealtimeServerEventSessionUpdated
- Unused model: FineTuneCompletionRequestInput
- Unused model: RealtimeClientEventTranscriptionSessionUpdate
- Unused model: RunStepStreamEvent
- Unused model: RealtimeServerEventResponseAudioDelta
- Unused model: RealtimeServerEventResponseAudioTranscriptDelta
- Unused model: RealtimeResponse
- Unused model: RealtimeServerEventInputAudioBufferSpeechStopped
- Unused model: RealtimeServerEventConversationItemTruncated
- Unused model: MessageDeltaContentTextAnnotationsFileCitationObject
- Unused model: RealtimeClientEventResponseCreate
- Unused model: RealtimeConversationItemWithReference
- Unused model: ChatCompletionModalities
- Unused model: FineTuneChatCompletionRequestAssistantMessage
- Unused model: RealtimeServerEventRateLimitsUpdated
- Unused model: RealtimeClientEventOutputAudioBufferClear
- Unused model: FineTuneChatRequestInput
- Unused model: MessageStreamEvent
- Unused model: RealtimeServerEventResponseAudioDone
- Unused model: MessageDeltaContentImageFileObject
- Unused model: RealtimeServerEventConversationItemDeleted
- Unused model: RealtimeServerEventSessionCreated
- Unused model: RealtimeServerEventResponseContentPartAdded
- Unused model: InputAudio
- Unused model: RealtimeServerEventOutputAudioBufferStarted
- Unused model: RealtimeServerEventOutputAudioBufferStopped
- Unused model: RunStreamEvent
- Unused model: RealtimeServerEventConversationItemInputAudioTranscriptionDelta
- Unused model: RealtimeClientEventConversationItemDelete
- Unused model: RealtimeServerEventResponseFunctionCallArgumentsDone
- Unused model: RealtimeServerEventResponseFunctionCallArgumentsDelta
- Unused model: RealtimeSession
- Unused model: RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
- Unused model: RealtimeClientEvent

[error] Spec has 20 errors.

Activity

  1. Ovid commented on May 26, 2025

    @Ovid

    This appears to be a duplicate of #452. We use different generators, so our list of errors doesn't quite match, but they're pretty close.

    Switching the version to 3.0.1 at the top of the spec might be a temporary workaround, despite the that openapi version still not matching the content.

    Update: I mean 3.1.0, not 3.0.1. Oops.

  2. Lfan-ke commented on May 26, 2025

    @Lfan-ke
    Author

    some error caused this:

    required: &a1
            - type
    
    required: *ai

    swagger not allowed deref

    if want to used deref, the version of openapi must to be 3.1.x, and fixed to like this:

    required:
            - $ref: "#/components/requiredFields/typeField"
  3. Lfan-ke commented on May 26, 2025

    @Lfan-ke
    Author

    openapi-generator-cli validate -i openapi-old.yaml

  4. Lfan-ke commented on May 26, 2025

    @Lfan-ke
    Author

    and some declared path parameter error, like this:

    • paths.'/organization/projects/{project_id}/certificates/activate'. Declared path parameter
      project_id needs to be defined as a path parameter in path or operation level

    on yaml:

      /organization/projects/{project_id}:
        get:
          summary: Retrieves a project.
      ...

    but the parameter project_id is shoud declare like this:

      /organization/projects/{project_id}:
        parameters:
          - name: project_id
            in: path
            required: true
            schema:
              type: string
        get:
          summary: Retrieves a project.
        ...
  5. added
    bugSomething isn't working
    specificationOpenAPI contract, authored schema, or specification publication defects.
    on Sep 6, 2026
  6. markstuart-oai commented on Sep 22, 2026

    @markstuart-oai
    Contributor

    Thanks for the reports. Changing the OpenAPI version header alone is not a complete fix. YAML anchors are distinct from schema references: required must list property-name strings, not $ref objects. Templated path parameters must also be declared as required path parameters.

    See the current status below for the fixes already published and the remaining validation failures.

  7. markstuart-oai commented on Sep 23, 2026

    @markstuart-oai
    Contributor

    Partially fixed; validation still fails, so this issue remains open.

    The published specification now includes the missing Realtime array types and removes the misplaced Realtime and Chat stream-options defaults.

    OpenAPI Generator 7.16.0 and 7.25.0 still reject the document's reserved x-oai-* extension names. The invalid transcription default and grader-range constraints also remain in the specification. These are separate from the Realtime fix.

    We have reproduced the remaining validation failures; no further information from the original reporter is needed to continue fixing them.

  8. added
    reproReproduced; investigation details recorded in Linear
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingreproReproduced; investigation details recorded in LinearspecificationOpenAPI contract, authored schema, or specification publication defects.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions