Skip to content

Support for nullable types on operation parameters #443

@ikitommi

Description

@ikitommi

{ "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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions