Represents a select subset of an OpenAPI 3.0 schema object.
| JSON representation |
|---|
{ "type": enum ( |
| Fields | |
|---|---|
type |
Required. The type of the data. |
properties |
Optional. Properties of Type.OBJECT. An object containing a list of |
required[] |
Optional. Required properties of Type.OBJECT. |
description |
Optional. The description of the data. |
items |
Optional. Schema of the elements of Type.ARRAY. |
nullable |
Optional. Indicates if the value may be null. |
uniqueItems |
Optional. Indicate the items in the array must be unique. Only applies to TYPE.ARRAY. |
prefixItems[] |
Optional. Schemas of initial elements of Type.ARRAY. |
additionalProperties |
Optional. Can either be a boolean or an object, controls the presence of additional properties. |
anyOf[] |
Optional. The value should be validated against any (one or more) of the subschemas in the list. |
enum[] |
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"]} |
default |
Optional. Default value of the data. |
ref |
Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root For example, the following schema defines a reference to a schema node named "Pet": type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring. |
defs |
Optional. A map of definitions for use by An object containing a list of |
title |
Optional. The title of the schema. |
minItems |
Optional. Minimum number of the elements for Type.ARRAY. |
maxItems |
Optional. Maximum number of the elements for Type.ARRAY. |
minimum |
Optional. Minimum value for Type.INTEGER and Type.NUMBER. |
maximum |
Optional. Maximum value for Type.INTEGER and Type.NUMBER. |
Schema.Type
OpenAPI data types.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Type unspecified. |
STRING |
String type. |
INTEGER |
Integer type. |
NUMBER |
Number type. |
BOOLEAN |
Boolean type. |
OBJECT |
Object type. |
ARRAY |
Array type. |