Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.
Optional. The type of the data.
format
string
Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc
title
string
Optional. The title of the Schema.
description
string
Optional. The description of the data.
nullable
boolean
Optional. Indicates if the value may be null.
Optional. Default value of the data.
Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of type.ARRAY.
Optional. Minimum number of the elements for type.ARRAY.
Optional. Maximum number of the elements for type.ARRAY.
enum[]
string
Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}
Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of type.OBJECT.
propertyOrdering[]
string
Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.
required[]
string
Optional. Required properties of type.OBJECT.
Optional. Minimum number of the properties for type.OBJECT.
Optional. Maximum number of the properties for type.OBJECT.
minimum
number
Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the type.INTEGER and type.NUMBER
maximum
number
Optional. Maximum value of the type.INTEGER and type.NUMBER
Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the type.STRING
Optional. Maximum length of the type.STRING
pattern
string
Optional. Pattern of the type.STRING to restrict a string to a regular expression.
Optional. Example of the object. Will only populated when the object is the root.
Optional. The value should be validated against any (one or more) of the subschemas in the list.
JSON representation |
---|
{ "type": enum ( |
Type
type contains the list of OpenAPI data types as defined by https://swagger.io/docs/specification/data-models/data-types/
Enums | |
---|---|
TYPE_UNSPECIFIED |
Not specified, should not be used. |
STRING |
OpenAPI string type |
NUMBER |
OpenAPI number type |
INTEGER |
OpenAPI integer type |
BOOLEAN |
OpenAPI boolean type |
ARRAY |
OpenAPI array type |
OBJECT |
OpenAPI object type |