Class JsonObjectSchema.Builder
-
- All Implemented Interfaces:
public class JsonObjectSchema.Builder
-
-
Constructor Summary
Constructors Constructor Description JsonObjectSchema.Builder()
-
Method Summary
Modifier and Type Method Description JsonObjectSchema.Builder
description(String description)
JsonObjectSchema.Builder
properties(Map<String, JsonSchemaElement> properties)
Sets the properties of this JSON object. JsonObjectSchema.Builder
addProperties(Map<String, JsonSchemaElement> properties)
Adds all properties in the parameter Map to the properties of this JSON object. JsonObjectSchema.Builder
addProperty(String name, JsonSchemaElement jsonSchemaElement)
Adds a single property to the properties of this JSON object. JsonObjectSchema.Builder
addStringProperty(String name)
Adds a single string property to the properties of this JSON object. JsonObjectSchema.Builder
addStringProperty(String name, String description)
Adds a single string property with a description to the properties of this JSON object. JsonObjectSchema.Builder
addIntegerProperty(String name)
Adds a single integer property to the properties of this JSON object. JsonObjectSchema.Builder
addIntegerProperty(String name, String description)
Adds a single integer property with a description to the properties of this JSON object. JsonObjectSchema.Builder
addNumberProperty(String name)
Adds a single number property to the properties of this JSON object. JsonObjectSchema.Builder
addNumberProperty(String name, String description)
Adds a single number property with a description to the properties of this JSON object. JsonObjectSchema.Builder
addBooleanProperty(String name)
Adds a single boolean property to the properties of this JSON object. JsonObjectSchema.Builder
addBooleanProperty(String name, String description)
Adds a single boolean property with a description to the properties of this JSON object. JsonObjectSchema.Builder
addEnumProperty(String name, List<String> enumValues)
Adds a single enum property to the properties of this JSON object. JsonObjectSchema.Builder
addEnumProperty(String name, List<String> enumValues, String description)
Adds a single enum property with a description to the properties of this JSON object. JsonObjectSchema.Builder
required(List<String> required)
JsonObjectSchema.Builder
required(Array<String> required)
JsonObjectSchema.Builder
additionalProperties(Boolean additionalProperties)
JsonObjectSchema.Builder
definitions(Map<String, JsonSchemaElement> definitions)
Used together with JsonReferenceSchema when recursion is required. JsonObjectSchema
build()
-
-
Method Detail
-
description
JsonObjectSchema.Builder description(String description)
-
properties
@Deprecated(forRemoval = true) JsonObjectSchema.Builder properties(Map<String, JsonSchemaElement> properties)
Sets the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addProperties
JsonObjectSchema.Builder addProperties(Map<String, JsonSchemaElement> properties)
Adds all properties in the parameter Map to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addProperty
JsonObjectSchema.Builder addProperty(String name, JsonSchemaElement jsonSchemaElement)
Adds a single property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addStringProperty
JsonObjectSchema.Builder addStringProperty(String name)
Adds a single string property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addStringProperty
JsonObjectSchema.Builder addStringProperty(String name, String description)
Adds a single string property with a description to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addIntegerProperty
JsonObjectSchema.Builder addIntegerProperty(String name)
Adds a single integer property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addIntegerProperty
JsonObjectSchema.Builder addIntegerProperty(String name, String description)
Adds a single integer property with a description to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addNumberProperty
JsonObjectSchema.Builder addNumberProperty(String name)
Adds a single number property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addNumberProperty
JsonObjectSchema.Builder addNumberProperty(String name, String description)
Adds a single number property with a description to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addBooleanProperty
JsonObjectSchema.Builder addBooleanProperty(String name)
Adds a single boolean property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addBooleanProperty
JsonObjectSchema.Builder addBooleanProperty(String name, String description)
Adds a single boolean property with a description to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addEnumProperty
JsonObjectSchema.Builder addEnumProperty(String name, List<String> enumValues)
Adds a single enum property to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
addEnumProperty
JsonObjectSchema.Builder addEnumProperty(String name, List<String> enumValues, String description)
Adds a single enum property with a description to the properties of this JSON object. Please note that required should be set explicitly if you want the properties to be mandatory.
-
required
JsonObjectSchema.Builder required(List<String> required)
-
required
JsonObjectSchema.Builder required(Array<String> required)
-
additionalProperties
JsonObjectSchema.Builder additionalProperties(Boolean additionalProperties)
-
definitions
JsonObjectSchema.Builder definitions(Map<String, JsonSchemaElement> definitions)
Used together with JsonReferenceSchema when recursion is required.
-
build
JsonObjectSchema build()
-
-
-
-