Class Schema.Builder
- Enclosing class:
- Schema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSetter for anyOf.anyOf(Schema.Builder... anyOfBuilders) Setter for anyOf builder.abstract Schema.BuilderSetter for anyOf.abstract Schemabuild()Clears the value of anyOf field.Clears the value of default_ field.Clears the value of description field.Clears the value of enum_ field.Clears the value of example field.Clears the value of format field.Clears the value of items field.Clears the value of maximum field.Clears the value of maxItems field.Clears the value of maxLength field.Clears the value of maxProperties field.Clears the value of minimum field.Clears the value of minItems field.Clears the value of minLength field.Clears the value of minProperties field.Clears the value of nullable field.Clears the value of pattern field.Clears the value of properties field.Clears the value of propertyOrdering field.Clears the value of required field.Clears the value of title field.Clears the value of type field.abstract Schema.BuilderSetter for default_.abstract Schema.Builderdescription(String description) Setter for description.Setter for enum_.abstract Schema.BuilderSetter for enum_.abstract Schema.BuilderSetter for example.abstract Schema.BuilderSetter for format.abstract Schema.BuilderSetter for items.items(Schema.Builder itemsBuilder) Setter for items builder.abstract Schema.BuilderSetter for maximum.abstract Schema.BuilderSetter for maxItems.abstract Schema.BuilderSetter for maxLength.abstract Schema.BuildermaxProperties(Long maxProperties) Setter for maxProperties.abstract Schema.BuilderSetter for minimum.abstract Schema.BuilderSetter for minItems.abstract Schema.BuilderSetter for minLength.abstract Schema.BuilderminProperties(Long minProperties) Setter for minProperties.abstract Schema.Buildernullable(boolean nullable) Setter for nullable.abstract Schema.BuilderSetter for pattern.abstract Schema.Builderproperties(Map<String, Schema> properties) Setter for properties.propertyOrdering(String... propertyOrdering) Setter for propertyOrdering.abstract Schema.BuilderpropertyOrdering(List<String> propertyOrdering) Setter for propertyOrdering.Setter for required.abstract Schema.BuilderSetter for required.abstract Schema.BuilderSetter for title.abstract Schema.BuilderSetter for type.type(Type.Known knownType) Setter for type given a known enum.Setter for type given a string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
anyOf
Setter for anyOf.anyOf: Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
-
anyOf
Setter for anyOf.anyOf: Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
-
anyOf
Setter for anyOf builder.anyOf: Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
-
clearAnyOf
Clears the value of anyOf field. -
default_
Setter for default_.default_: Optional. Default value to use if the field is not specified.
-
clearDefault_
Clears the value of default_ field. -
description
Setter for description.description: Optional. Description of the schema.
-
clearDescription
Clears the value of description field. -
enum_
Setter for enum_.enum_: Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH", "WEST"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:["101", "201", "301"]}`
-
enum_
Setter for enum_.enum_: Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH", "WEST"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:["101", "201", "301"]}`
-
clearEnum_
Clears the value of enum_ field. -
example
Setter for example.example: Optional. Example of an instance of this schema.
-
clearExample
Clears the value of example field. -
format
Setter for format.format: Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
-
clearFormat
Clears the value of format field. -
items
Setter for items.items: Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
-
items
Setter for items builder.items: Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
-
clearItems
Clears the value of items field. -
maxItems
Setter for maxItems.maxItems: Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
-
clearMaxItems
Clears the value of maxItems field. -
maxLength
Setter for maxLength.maxLength: Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
-
clearMaxLength
Clears the value of maxLength field. -
maxProperties
Setter for maxProperties.maxProperties: Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
-
clearMaxProperties
Clears the value of maxProperties field. -
maximum
Setter for maximum.maximum: Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
-
clearMaximum
Clears the value of maximum field. -
minItems
Setter for minItems.minItems: Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
-
clearMinItems
Clears the value of minItems field. -
minLength
Setter for minLength.minLength: Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
-
clearMinLength
Clears the value of minLength field. -
minProperties
Setter for minProperties.minProperties: Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
-
clearMinProperties
Clears the value of minProperties field. -
minimum
Setter for minimum.minimum: Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
-
clearMinimum
Clears the value of minimum field. -
nullable
Setter for nullable.nullable: Optional. Indicates if the value of this field can be null.
-
clearNullable
Clears the value of nullable field. -
pattern
Setter for pattern.pattern: Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
-
clearPattern
Clears the value of pattern field. -
properties
Setter for properties.properties: Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
-
clearProperties
Clears the value of properties field. -
propertyOrdering
Setter for propertyOrdering.propertyOrdering: Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
-
propertyOrdering
Setter for propertyOrdering.propertyOrdering: Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
-
clearPropertyOrdering
Clears the value of propertyOrdering field. -
required
Setter for required.required: Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
-
required
Setter for required.required: Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
-
clearRequired
Clears the value of required field. -
title
Setter for title.title: Optional. Title for the schema.
-
clearTitle
Clears the value of title field. -
type
Setter for type.type: Optional. Data type of the schema field.
-
clearType
Clears the value of type field. -
type
Setter for type given a known enum.type: Optional. Data type of the schema field.
-
type
Setter for type given a string.type: Optional. Data type of the schema field.
-
build
-