Class SchemaRepository


  • public class SchemaRepository
    extends Object
    A repository is a holder of dereferenced schemas, it can be used to create validator instances for a specific schema.

    This is to be used when multiple schema objects compose the global schema to be used for validation.

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

    • Constructor Detail

      • SchemaRepository

        public SchemaRepository​(io.vertx.json.schema.SchemaRepository delegate)
      • SchemaRepository

        public SchemaRepository​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.json.schema.SchemaRepository getDelegate()
      • hashCode

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

        public static SchemaRepository create​(io.vertx.json.schema.JsonSchemaOptions options)
        Parameters:
        options - the initial configuration
        Returns:
        a repository
      • create

        public static SchemaRepository create​(io.vertx.json.schema.JsonSchemaOptions options,
                                              JsonFormatValidator jsonFormatValidator)
        Parameters:
        options - the initial configuration
        jsonFormatValidator -
        Returns:
        a repository
      • dereference

        public SchemaRepository dereference​(JsonSchema schema)
        Parameters:
        schema - a new schema to list
        Returns:
        a repository
      • dereference

        public SchemaRepository dereference​(String uri,
                                            JsonSchema schema)
        Parameters:
        uri - the source of the schema used for de-referencing, optionally relative to JsonSchemaOptions.
        schema - a new schema to list
        Returns:
        a repository
      • preloadMetaSchema

        public SchemaRepository preloadMetaSchema​(FileSystem fs)
        Parameters:
        fs - The Vert.x file system to load the related schema meta files from classpath
        Returns:
        a repository
      • preloadMetaSchema

        public SchemaRepository preloadMetaSchema​(FileSystem fs,
                                                  io.vertx.json.schema.Draft draft)
        Parameters:
        fs - The Vert.x file system to load the related schema meta files from classpath
        draft - The draft version of the meta files to load
        Returns:
        a repository
      • validator

        public Validator validator​(JsonSchema schema)
        Parameters:
        schema - the start validation schema
        Returns:
        the validator
      • validator

        public Validator validator​(String ref)
        Parameters:
        ref - the start validation reference in JSON pointer format
        Returns:
        the validator
      • validator

        public Validator validator​(String ref,
                                   io.vertx.json.schema.JsonSchemaOptions options)
        Parameters:
        ref - the start validation reference in JSON pointer format
        options - the options to be using on the validator instance
        Returns:
        the validator
      • validator

        public Validator validator​(JsonSchema schema,
                                   io.vertx.json.schema.JsonSchemaOptions options)
        Parameters:
        schema - the start validation schema
        options - the options to be using on the validator instance
        Returns:
        the validator
      • validator

        public Validator validator​(JsonSchema schema,
                                   io.vertx.json.schema.JsonSchemaOptions options,
                                   boolean dereference)
        Parameters:
        schema - the start validation schema
        options - the options to be using on the validator instance
        dereference - if true the schema will be dereferenced before validation
        Returns:
        the validator
      • resolve

        public io.vertx.core.json.JsonObject resolve​(io.vertx.core.json.JsonObject schema)
        Parameters:
        schema - the JSON object to resolve.
        Returns:
        a new JSON object with all the $ref replaced by actual object references.
      • resolve

        public io.vertx.core.json.JsonObject resolve​(String ref)
        Parameters:
        ref - the start resolution reference in JSON pointer format
        Returns:
        a new representing the schema with $refs replaced by their value.
      • resolve

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

        public JsonSchema find​(String pointer)
        Parameters:
        pointer - the JSON pointer
        Returns:
        the schema
      • newInstance

        public static SchemaRepository newInstance​(io.vertx.json.schema.SchemaRepository arg)