Skip to content

Nullable objects #5660

@zuozp8

Description

@zuozp8

Q&A

  • Swagger-UI version: 3.24.0
  • Swagger/OpenAPI version: OpenAPI 3.0.2

Content & configuration

I'm using http://editor.swagger.io/

Example Swagger/OpenAPI definition:

openapi: 3.0.2
info:
  title: Foo
  description: ''
  version: '1.0'
paths: {}
components:
  schemas:
    SomeObject:
      type: object
      properties:
        meta:
          type: object
          properties:
            tag:
              type:  string
          nullable: true

Describe the bug you're encountering

Field SomeObject.meta is not marked as nullable.

My api distinguishes sending null and not sending the field at all, so I would like to show that the object-type field is either optional or nullable or both

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