io.vertx.json.schema

## Interface SchemaParser

- All Known Subinterfaces:
    SchemaParserInternal
  All Known Implementing Classes:
    BaseSchemaParser, Draft201909SchemaParser, Draft7SchemaParser, OpenAPI3SchemaParser

  Deprecated.
  users should migrate to the new validator

      @Deprecated
      public interface SchemaParser

  Parse a Json Schema. The parser can be extended to support custom keywords using `this#withValidatorFactory(ValidatorFactory)`

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SchemaParser` | `createDraft201909SchemaParser(SchemaRouter router)` Deprecated. Create a new `SchemaParser` for Json Schema Draft2019-09 schemas
    `static SchemaParser` | `createDraft7SchemaParser(SchemaRouter router)` Deprecated. Create a new `SchemaParser` for Json Schema Draft-7 schemas
    `static SchemaParser` | `createOpenAPI3SchemaParser(SchemaRouter router)` Deprecated. Create a new `SchemaParser` for OpenAPI schemas
    `SchemaRouter` | `getSchemaRouter()` Deprecated. Get schema router registered to this schema parser
    `Schema` | `parse(Boolean jsonSchema)` Deprecated. Builds a true of false schema assigning a random scope
    `Schema` | `parse(Boolean jsonSchema, JsonPointer schemaPointer)` Deprecated. Builds a true of false schema
    `Schema` | `parse(JsonObject jsonSchema)` Deprecated. Build a schema from provided json assigning a random scope.
    `Schema` | `parse(JsonObject jsonSchema, JsonPointer schemaPointer)` Deprecated. Build a schema from provided json.
    `Schema` | `parseFromString(String unparsedJson)` Deprecated. Build a schema from provided unparsed json assigning a random scope.
    `Schema` | `parseFromString(String unparsedJson, JsonPointer schemaPointer)` Deprecated. Build a schema from provided unparsed json.
    `SchemaParser` | `withStringFormatValidator(String formatName, java.util.function.Predicate<String> predicate)` Deprecated. Add a custom format validator
    `SchemaParser` | `withValidatorFactory(ValidatorFactory factory)` Deprecated. Add a `ValidatorFactory` to this schema parser to support custom keywords

- - ### Method Detail

    - #### parse

          Schema parse(JsonObject jsonSchema)

      Deprecated.
      Build a schema from provided json assigning a random scope. This method registers the parsed schema (and relative subschemas) to the schema router
      Parameters:
        `jsonSchema` - JSON representing the schema
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### parse

          Schema parse(JsonObject jsonSchema,
                       JsonPointer schemaPointer)

      Deprecated.
      Build a schema from provided json. This method registers the parsed schema (and relative subschemas) to the schema router
      Parameters:
        `jsonSchema` - JSON representing the schema
        `schemaPointer` - Scope of schema. Must be a JSONPointer with absolute URI
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### parse

          Schema parse(Boolean jsonSchema)

      Deprecated.
      Builds a true of false schema assigning a random scope
      Parameters:
        `jsonSchema` - JSON representing the schema
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### parse

          Schema parse(Boolean jsonSchema,
                       JsonPointer schemaPointer)

      Deprecated.
      Builds a true of false schema
      Parameters:
        `jsonSchema` - JSON representing the schema
        `schemaPointer` - Scope of schema. Must be a JSONPointer with absolute URI
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### parseFromString

          Schema parseFromString(String unparsedJson)

      Deprecated.
      Build a schema from provided unparsed json assigning a random scope. This method registers the parsed schema (and relative subschemas) to the schema router
      Parameters:
        `unparsedJson` - Unparsed JSON representing the schema.
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### parseFromString

          Schema parseFromString(String unparsedJson,
                                 JsonPointer schemaPointer)

      Deprecated.
      Build a schema from provided unparsed json. This method registers the parsed schema (and relative subschemas) to the schema router
      Parameters:
        `unparsedJson` - Unparsed JSON representing the schema.
        `schemaPointer` - Scope of schema. Must be a JSONPointer with absolute URI
      Returns:
        the schema instance
      Throws:
        `IllegalArgumentException` - If scope is relative
        `SchemaException` - If schema is invalid

    - #### getSchemaRouter

          SchemaRouter getSchemaRouter()

      Deprecated.
      Get schema router registered to this schema parser
      Returns:

    - #### withValidatorFactory

          SchemaParser withValidatorFactory(ValidatorFactory factory)

      Deprecated.
      Add a `ValidatorFactory` to this schema parser to support custom keywords
      Parameters:
        `factory` - new factory
      Returns:
        a reference to this

    - #### withStringFormatValidator

          SchemaParser withStringFormatValidator(String formatName,
                                                 java.util.function.Predicate<String> predicate)

      Deprecated.
      Add a custom format validator
      Parameters:
        `formatName` - format name
        `predicate` - predicate for the new format
      Returns:
        a reference to this

    - #### createOpenAPI3SchemaParser

          static SchemaParser createOpenAPI3SchemaParser(SchemaRouter router)

      Deprecated.
      Create a new `SchemaParser` for OpenAPI schemas
      Parameters:
        `router` -
      Returns:

    - #### createDraft7SchemaParser

          static SchemaParser createDraft7SchemaParser(SchemaRouter router)

      Deprecated.
      Create a new `SchemaParser` for Json Schema Draft-7 schemas
      Parameters:
        `router` -
      Returns:

    - #### createDraft201909SchemaParser

          static SchemaParser createDraft201909SchemaParser(SchemaRouter router)

      Deprecated.
      Create a new `SchemaParser` for Json Schema Draft2019-09 schemas
      Parameters:
        `router` -
      Returns:

Copyright © 2022 Eclipse. All rights reserved.