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

type: 'null' properties support in schemas #138

Closed
peter-plochan opened this issue Mar 26, 2020 · 3 comments
Closed

type: 'null' properties support in schemas #138

peter-plochan opened this issue Mar 26, 2020 · 3 comments
Labels
OpenAPI 3.1 Time to get ready for the next version of the OpenAPI specification
Milestone

Comments

@peter-plochan
Copy link

Even it's not released yet, in OpenAPI 3.1 Specification, there will be support for the type: 'null' property within schemas (see also JSON Schema Draft 2019-09). It seems that the parser doesn't support this for now because using swagger-cli tool, the schema validation fails with the message:

Data does not match any schemas from 'oneOf' at #/paths//pets/{id}/put/requestBody/content/application/json/schema
      Data does not match any schemas from 'oneOf' at #/content/application/json/schema/properties/nullProp
        No enum match for: null at #/properties/nullProp/type
        Missing required property: $ref at #/properties/nullProp
      Missing required property: $ref at #/content/application/json/schema
    Missing required property: $ref at #/paths//pets/{id}/put/requestBody

I'm not sure how strict the parser (and its validation) would be, but it would be nice to support "null" type there. Thanks

@JamesMessinger
Copy link
Member

Thanks for opening this ticket. There are several major changes in OpenAPI 3.1, and we're planning to start soon on supporting them all.

@JamesMessinger JamesMessinger added this to the OpenAPI 3.1 milestone Mar 26, 2020
@JamesMessinger JamesMessinger added the OpenAPI 3.1 Time to get ready for the next version of the OpenAPI specification label Mar 27, 2020
@seriousme
Copy link
Contributor

@JamesMessinger OpenApi 3.1 has been released and the schema is available at:
https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v3.1

Anything we can do to help ?

@philsturgeon
Copy link
Member

Let's track OAS3.1 work under #169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenAPI 3.1 Time to get ready for the next version of the OpenAPI specification
Projects
None yet
Development

No branches or pull requests

4 participants