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

Support for nullable types on operation parameters #443

Closed
ikitommi opened this issue Aug 18, 2015 · 1 comment · May be fixed by ekmixon/OpenAPI-Specification#2 or MaxMood96/OpenAPI-Specification#40

Comments

@ikitommi
Copy link
Contributor

{ "type": ["string", "null"] } is a valid JSON Schema type definition and as Swagger Schema references the schema directly (https://github.com/reverb/swagger-spec/blob/master/schemas/v2.0/schema.json#L489) - it works and is shown on the swagger-ui. It does not work when added as operation parameters: https://github.com/reverb/swagger-spec/blob/master/schemas/v2.0/schema.json#L393-L396.

It could and should?

sample working swagger.json with nullable field on the schema properties:

https://gist.githubusercontent.com/ikitommi/7de56d1a89534bbbbfaa/raw/3c96da810b0b836e617907f92578ae4f27f79c8c/swagger2.json

@webron
Copy link
Member

webron commented Aug 18, 2015

For 2.0, it can't and shouldn't. Keep in mind the source of truth is the spec, not schema. Please follow #229.

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