Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lnash94 opened this issue Jan 30, 2024 · 0 comments
Open

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

lnash94 opened this issue Jan 30, 2024 · 0 comments

Comments

@lnash94
Copy link

lnash94 commented Jan 30, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant