Class JsonSchema
java.lang.Object
io.vertx.rxjava3.json.schema.JsonSchema
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
A Json-Schema holder.
There are 2 kinds of Json-Schema's:
- JSON Object based
- Boolean based
This is a common interface to handle all kinds of schemas.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<JsonSchema> Predicate to filter out annotation keys.Predicate to filter out annotation keys. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnnotates the schema.booleancontainsKey(String key) Checks if the given key is present in the schema object.booleanReturns the field names on the underlying object.<R> RGet a type casted value by key.<R> RGet a type casted value by key.inthashCode()static JsonSchemanewInstance(JsonSchema arg) static JsonSchemaof(boolean bool) Factory method to create aJsonSchemafrom aBoolean.static JsonSchemaof(JsonObject json) Factory method to create aJsonSchemafrom a .static JsonSchemaof(String id, JsonObject json) Factory method to create aJsonSchemafrom a .toString()
-
Field Details
-
__TYPE_ARG
-
EXCLUDE_ANNOTATIONS
-
EXCLUDE_ANNOTATION_ENTRIES
-
-
Constructor Details
-
JsonSchema
-
JsonSchema
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
of
Factory method to create aJsonSchemafrom a .- Parameters:
json- a JSON Object.- Returns:
- a wrapper for the input object.
-
of
Factory method to create aJsonSchemafrom a .- Parameters:
id- will force the given id as the schema $id.json- a JSON Object.- Returns:
- a wrapper for the input object.
-
of
Factory method to create aJsonSchemafrom aBoolean.- Parameters:
bool- a boolean.- Returns:
- a wrapper for the input object.
-
annotate
Annotates the schema. An annotation is a extra key-value added to the schema that are not relevant for validation but can be used to store pre-computed state.- Parameters:
key- a keyvalue- a value- Returns:
-
get
Get a type casted value by key.- Parameters:
key- a key- Returns:
- the value or
null
-
get
Get a type casted value by key. If the key is missing, then the fallback value is returned.- Parameters:
key- a keyfallback- fallback when key is not present- Returns:
- the value or
null
-
containsKey
Checks if the given key is present in the schema object.- Parameters:
key- a key- Returns:
trueif present
-
fieldNames
-
newInstance
-