Package io.vertx.rxjava3.json.schema
Class Schema
- java.lang.Object
-
- io.vertx.rxjava3.json.schema.Schema
-
public class Schema extends Object
Interface representing a Json Schema
A schema could have two states:
- Synchronous: The validators tree can provide a synchronous validation, so you can validate your json both using and
- Asynchronous: One or more branches of the validator tree requires an asynchronous validation, so you must use to validate your json. If you use it will throw a
NoSyncValidationException
To check the schema state you can use method . Note that invoking
NOTE: This class has been automatically generated from thevalidateAsync(java.lang.Object)generally doesn't have any additional overhead than invokingvalidateSync(java.lang.Object).
The schema can mutate the state in time, e.g. if you have a schema that is asynchronous because of a$ref, after the first validation the external schema is cached insideSchemaRouterand this schema will switch to synchronous state
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Schema>__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object o)SchemagetDelegate()ObjectgetJson()Deprecated.JsonPointergetScope()Deprecated.inthashCode()booleanisSync()Deprecated.static SchemanewInstance(Schema arg)StringtoString()Future<Void>validateAsync(Object json)Deprecated.voidvalidateSync(Object json)Deprecated.
-
-
-
Method Detail
-
getDelegate
public Schema getDelegate()
-
validateAsync
@Deprecated public Future<Void> validateAsync(Object json)
Deprecated.Validate the json performing an asynchronous validation.
Note: If the schema is synchronous, this method will call internally
- Parameters:
json- input to validate- Returns:
- a failed future with
ValidationExceptionif json doesn't match the schema, otherwise a succeeded future.
-
validateSync
@Deprecated public void validateSync(Object json)
Deprecated.Validate the json performing a synchronous validation. Throws aValidationExceptionif json doesn't match the schema.- Parameters:
json- input to validate
-
getScope
@Deprecated public JsonPointer getScope()
Deprecated.- Returns:
- scope of this schema
-
getJson
@Deprecated public Object getJson()
Deprecated.- Returns:
- Json representation of the schema
-
isSync
@Deprecated public boolean isSync()
Deprecated.- Returns:
- true if this validator can provide a synchronous validation.
-
-