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

OpenAPI 3.0 nullable not supported #8369

Closed
fabiendeborde opened this issue Apr 22, 2020 · 3 comments · Fixed by #8527
Closed

OpenAPI 3.0 nullable not supported #8369

fabiendeborde opened this issue Apr 22, 2020 · 3 comments · Fixed by #8527

Comments

@fabiendeborde
Copy link

Hello,
I am working on a schema that was failing validation in Postman documentation tab, and finally found why it was failing.
I have this property in the schema

siteLogo:
    type: string

and this example

siteLogo: null

Even when adding nullable: true in my schema the validation fails.
If I replace the example by siteLogo: '', it passes.

Am i missing something, or the nullable property is not supported?

@VShingala
Copy link
Member

@fabiendeborde Yes, It seems nullable keyword is not supported yet. The reason for it is we use JSON schema validation (we first convert OpenAPI schema to JSON schema for validation) and nullable is not supported by JSON schema.

Adding this as feature request.

@VShingala VShingala self-assigned this Apr 22, 2020
@fabiendeborde
Copy link
Author

@VShingala
Thank you for your answer. I was not sure if I had missed something.
From what I have read, the null type is supported in OpenAPI 3.1.
Between nullable property and null type, I have no idea which is easier to implement, but I hope you can add this feature in a somewhat near future.

@abhijitkane
Copy link
Member

Thanks for reporting this @fabiendeborde
@VShingala Changed this to bug - we should correctly interpret all parts of OAS that we claim to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants