Class JsonSchema

java.lang.Object
io.vertx.mutiny.json.schema.JsonSchema
All Implemented Interfaces:
MutinyDelegate

public class JsonSchema extends Object implements 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 using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final TypeArg<JsonSchema> __TYPE_ARG
    • EXCLUDE_ANNOTATIONS

      public static final Predicate<String> EXCLUDE_ANNOTATIONS
      Predicate to filter out annotation keys.
    • EXCLUDE_ANNOTATION_ENTRIES

      public static final Predicate<Map.Entry<String,Object>> EXCLUDE_ANNOTATION_ENTRIES
      Predicate to filter out annotation keys.
  • Constructor Details

    • JsonSchema

      public JsonSchema(io.vertx.json.schema.JsonSchema delegate)
    • JsonSchema

      public JsonSchema(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.json.schema.JsonSchema getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • of

      public static JsonSchema of(io.vertx.core.json.JsonObject json)
      Parameters:
      json - a JSON Object.
      Returns:
      a wrapper for the input object.
    • of

      public static JsonSchema of(String id, io.vertx.core.json.JsonObject json)
      Parameters:
      id - will force the given id as the schema $id.
      json - a JSON Object.
      Returns:
      a wrapper for the input object.
    • of

      public static JsonSchema of(boolean bool)
      Parameters:
      bool - a boolean.
      Returns:
      a wrapper for the input object.
    • annotate

      public JsonSchema annotate(String key, String value)
      Parameters:
      key - a key
      value - a value
      Returns:
      the instance of JsonSchema to chain method calls.
    • get

      public <R> R get(String key)
      Parameters:
      key - a key
      Returns:
      the value or null
    • get

      public <R> R get(String key, R fallback)
      Parameters:
      key - a key
      fallback - fallback when key is not present
      Returns:
      the value or null
    • containsKey

      public boolean containsKey(String key)
      Parameters:
      key - a key
      Returns:
      true if present
    • fieldNames

      public Set<String> fieldNames()
      Returns:
      field names
    • resolve

      public io.vertx.core.json.JsonObject resolve()
      Returns:
      a new representing the schema with $refs replaced by their value.
    • newInstance

      public static JsonSchema newInstance(io.vertx.json.schema.JsonSchema arg)