- 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.static SchemaItemcreate()Create a new instance with default values.Description of the item.default voidgenerate(Hson.Struct.Builder builder) Deprecated, for removal: This API element is subject to removal in a future version.this method is not intended to be broadly used.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
-
create
Create a new instance with default values.- Returns:
- a new instance
-
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
-
generate
Deprecated, for removal: This API element is subject to removal in a future version.this method is not intended to be broadly used. Will be removed later.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- hson struct builder
-