io.vertx.ext.json.schema.rxjava

## Class Schema

- java.lang.Object
- - io.vertx.ext.json.schema.rxjava.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
  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 inside `SchemaRouter` and this schema will switch to synchronous state

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<Schema>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Schema(Object delegate)`
    `Schema(Schema delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyDefaultValues(JsonArray array)` This function mutates `array` applying default values, when available.
    `void` | `applyDefaultValues(JsonObject object)` This function mutates `object` applying default values, when available.
    `boolean` | `equals(Object o)`
    `Object` | `getDefaultValue()` Return the default value defined in the schema
    `Schema` | `getDelegate()`
    `Object` | `getJson()` Get Json representation of the schema
    `JsonPointer` | `getScope()` Get scope of this schema
    `boolean` | `hasDefaultValue()` Return true if the schema has a default value defined
    `int` | `hashCode()`
    `boolean` | `isSync()` Returns true if this validator can actually provide a synchronous validation
    `static Schema` | `newInstance(Schema arg)`
    `String` | `toString()`
    `Future<Void>` | `validateAsync(Object json)` Validate the json performing an asynchronous validation.
    `void` | `validateSync(Object json)` Validate the json performing a synchronous validation.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<Schema> __TYPE_ARG

  - ### Constructor Detail

    - #### Schema

          public Schema(Schema delegate)

    - #### Schema

          public Schema(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public Schema getDelegate()

    - #### validateAsync

          public Future<Void> validateAsync(Object json)

      Validate the json performing an asynchronous validation. Returns a failed future with `ValidationException` if json doesn't match the schema.

      Note: If the schema is synchronous, this method will call internally

      Parameters:
        `json` -
      Returns:

    - #### validateSync

          public void validateSync(Object json)

      Validate the json performing a synchronous validation. Throws a `ValidationException` if json doesn't match the schema.
      Parameters:
        `json` -

    - #### getScope

          public JsonPointer getScope()

      Get scope of this schema
      Returns:

    - #### getJson

          public Object getJson()

      Get Json representation of the schema
      Returns:

    - #### getDefaultValue

          public Object getDefaultValue()

      Return the default value defined in the schema
      Returns:

    - #### hasDefaultValue

          public boolean hasDefaultValue()

      Return true if the schema has a default value defined
      Returns:

    - #### applyDefaultValues

          public void applyDefaultValues(JsonArray array)

      This function mutates `array` applying default values, when available.
      Parameters:
        `array` -

    - #### applyDefaultValues

          public void applyDefaultValues(JsonObject object)

      This function mutates `object` applying default values, when available.
      Parameters:
        `object` -

    - #### isSync

          public boolean isSync()

      Returns true if this validator can actually provide a synchronous validation
      Returns:

    - #### newInstance

          public static Schema newInstance(Schema arg)

Copyright © 2020 Eclipse. All rights reserved.