Class Ref

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

public class Ref extends Object implements MutinyDelegate
JsonObject $ref resolver. This interface is used to resolve $ref in a JsonObject. The result is a new JsonObject with all the $ref replaced by actual object references. This new object allows navigation and queries using JsonPointer but will not be able to be encoded back to JSON when circular dependencies are present. The resolver will only resolve local references as defined in RFC3986. A local reference is a reference that starts with # and is followed by a valid JSON Pointer.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Paulo Lopes
See Also:
  • Ref
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TypeArg<Ref>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ref(io.vertx.json.schema.Ref delegate)
    Create a new instance of Ref delegating to the given (non-null) instance of Ref.
    Ref(Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    io.vertx.json.schema.Ref
    Get the delegate instance.
    int
     
    static Ref
    newInstance(io.vertx.json.schema.Ref delegate)
    Creates a new instance of the Ref.
    static io.vertx.core.json.JsonObject
    resolve(io.vertx.core.json.JsonObject json)
    Resolve all $ref in the given JsonObject.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • __TYPE_ARG

      public static final TypeArg<Ref> __TYPE_ARG
  • Constructor Details

    • Ref

      public Ref(io.vertx.json.schema.Ref delegate)
      Create a new instance of Ref delegating to the given (non-null) instance of Ref.
    • Ref

      public Ref(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.json.schema.Ref 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:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • resolve

      public static io.vertx.core.json.JsonObject resolve(io.vertx.core.json.JsonObject json)
      Resolve all $ref in the given JsonObject. The resolution algorithm is not aware of other specifications. When resolving OpenAPI documents (which only allow $ref at specific locations) you should validate if the document is valid before performing a resolution. It is important to note that any sibling elements of a $ref is ignored. This is because $ref works by replacing itself and everything on its level with the definition it is pointing at.
      Parameters:
      json - the JSON object to resolve.
      Returns:
      a new JSON object with all the $ref replaced by actual object references.
      Throws:
      when - the input JSON is not valid.
      reducing - the JSON pointer to a value is undefined.
    • newInstance

      public static Ref newInstance(io.vertx.json.schema.Ref delegate)
      Creates a new instance of the Ref.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object