- All Superinterfaces:
Prototype.Api
- All Known Subinterfaces:
SchemaArray,SchemaBoolean,SchemaInteger,SchemaNull,SchemaNumber,SchemaObject,SchemaString
- All Known Implementing Classes:
SchemaArray.BuilderBase.SchemaArrayImpl,SchemaBoolean.BuilderBase.SchemaBooleanImpl,SchemaInteger.BuilderBase.SchemaIntegerImpl,SchemaItem.BuilderBase.SchemaItemImpl,SchemaNull.BuilderBase.SchemaNullImpl,SchemaNumber.BuilderBase.SchemaNumberImpl,SchemaObject.BuilderBase.SchemaObjectImpl,SchemaString.BuilderBase.SchemaStringImpl
Common interface for all Json Schema items.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forSchemaItem.static classSchemaItem.BuilderBase<BUILDER extends SchemaItem.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends SchemaItem> Fluent API builder base forSchemaItem. -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaItem.Builderbuilder()Create a new fluent API builder to customize configuration.static SchemaItem.Builderbuilder(SchemaItem instance) Create a new fluent API builder from an existing instance.Description of the item.default voidgenerate(JsonObject.Builder builder) Generated the Json schema item to the Json.booleanrequired()Used in the object properties to mark required property.Schema type of the item.title()Title of the item.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
generate
Generated the Json schema item to the Json. This method servers mainly as a helpful tool for the Json generation. It should not be used.- Parameters:
builder- json object builder
-
title
Title of the item.- Returns:
- item title
-
description
Description of the item.- Returns:
- item description
-
required
boolean required()Used in the object properties to mark required property.- Returns:
- whether object property is required
-
schemaType
SchemaType schemaType()Schema type of the item.- Returns:
- schema type
-