Package io.vertx.json.schema.common.dsl
Class SchemaBuilder<T extends SchemaBuilder<?,?>,K extends Keyword>
- java.lang.Object
-
- io.vertx.json.schema.common.dsl.SchemaBuilder<T,K>
-
- Type Parameters:
T
-K
-
- Direct Known Subclasses:
ArraySchemaBuilder
,BooleanSchemaBuilder
,GenericSchemaBuilder
,NumberSchemaBuilder
,ObjectSchemaBuilder
,StringSchemaBuilder
,TupleSchemaBuilder
public abstract class SchemaBuilder<T extends SchemaBuilder<?,?>,K extends Keyword> extends Object
Entry point for schema dsl. Look at the doc for more info
-
-
Constructor Summary
Constructors Constructor Description SchemaBuilder(SchemaType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
alias(String alias)
T
defaultValue(Object defaultValue)
T
fromJson(JsonObject object)
SchemaType
getType()
T
id(JsonPointer id)
T
nullable()
JsonObject
toJson()
T
type(SchemaType type)
T
with(K keyword)
T
with(K... keywords)
T
withKeyword(String key, Object value)
-
-
-
Field Detail
-
type
protected SchemaType type
-
id
protected URI id
-
-
Constructor Detail
-
SchemaBuilder
public SchemaBuilder(SchemaType type)
-
-
Method Detail
-
id
public T id(JsonPointer id)
-
fromJson
public T fromJson(JsonObject object)
-
nullable
public T nullable()
-
type
public T type(SchemaType type)
-
getType
public SchemaType getType()
-
toJson
public JsonObject toJson()
-
-