Last updated

x-nullable

Compatibility warning

This specification extension is supported only in OpenAPI 2.0.

Usage

Use x-nullable in your OpenAPI 2.0 documents to mark schemas with the label Nullable in the API documentation. This indicates that the value of a particular property may be null. Add it to the schema OpenAPI object.

Field NameTypeDescription
x-nullablebooleanMarks schema as a nullable.

Examples

swagger: '2.0'
info: ...
tags: [...]
schemas:
  country:
    type: string
    description: Country of origin
    x-nullable: true