Package io.vertx.mutiny.json.schema
Class JsonSchema
java.lang.Object
io.vertx.mutiny.json.schema.JsonSchema
- All Implemented Interfaces:
MutinyDelegate
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 Mutiny-ified interface.
- Author:
- Paulo Lopes
- See Also:
-
JsonSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<JsonSchema>Predicate to filter out annotation keys.Predicate to filter out annotation keys. -
Constructor Summary
ConstructorsConstructorDescriptionJsonSchema(io.vertx.json.schema.JsonSchema delegate) Create a new instance ofJsonSchemadelegating to the given (non-null) instance ofJsonSchema.JsonSchema(Object delegate) -
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.io.vertx.json.schema.JsonSchemaGet the delegate instance.inthashCode()static JsonSchemanewInstance(io.vertx.json.schema.JsonSchema delegate) Creates a new instance of theJsonSchema.static JsonSchemaof(boolean bool) Factory method to create aJsonSchemafrom aBoolean.static JsonSchemaof(io.vertx.core.json.JsonObject json) Factory method to create aJsonSchemafrom aJsonObject.static JsonSchemaFactory method to create aJsonSchemafrom aJsonObject.toString()
-
Field Details
-
EXCLUDE_ANNOTATIONS
Predicate to filter out annotation keys. -
EXCLUDE_ANNOTATION_ENTRIES
Predicate to filter out annotation keys. -
__TYPE_ARG
-
-
Constructor Details
-
JsonSchema
public JsonSchema(io.vertx.json.schema.JsonSchema delegate) Create a new instance ofJsonSchemadelegating to the given (non-null) instance ofJsonSchema. -
JsonSchema
-
-
Method Details
-
getDelegate
public io.vertx.json.schema.JsonSchema getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
of
Factory method to create aJsonSchemafrom aJsonObject.- Parameters:
json- a JSON Object.- Returns:
- a wrapper for the input object.
-
of
Factory method to create aJsonSchemafrom aJsonObject.- 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
-
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
Returns the field names on the underlying object.- Returns:
- field names
-
newInstance
Creates a new instance of theJsonSchema. -
hashCode
public int hashCode() -
equals
-
toString
-