Skip to content

Parsing error with object default value when the nullable true enable #2050

Description

@lnash94

Hi Team,

I'm using OpenAPIV3Parser to get openAPI specifications for the parser version 2.1.16. I am wondering when I used the default value as a null for the object type which is enabled nullable true. It returns below parser issues[1].
is there any particular reason we can not have null as the default in the object type when it is nullable true?

[1] parser issue

attribute components.schemas.CreateChatCompletionRequest.default is not of type `object`

example code logit_bias field has object type with nullable true enable:

CreateChatCompletionRequest:
      type: object
      properties:
        ...
        logit_bias:
          type: object
          x-oaiTypeLabel: map
          default: null
          nullable: true
          additionalProperties:
            type: integer

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