modules/json-schema-validator/src/main/java/io/restassured/module/jsv/JsonSchemaValidator.java
public static JsonSchemaValidator matchesJsonSchema(String schema) {
        return new JsonSchemaValidatorFactory<String>() {
            @Override
            JsonNode createSchemaInstance(String input) throws IOException {
                return JsonLoader.fromString(input);
            }
        }.create(schema);
    }
public static JsonSchemaValidator matchesJsonSchema(String schema) {
        return new JsonSchemaValidatorFactory<String>() {
            @Override
            JsonNode createSchemaInstance(String input) throws IOException {
                return JsonLoader.fromString(input);
            }
        }.create(schema);
    }
Creates a Hamcrest matcher that validates that a JSON document conforms to the JSON schema provided to this method.

@param schema The string defining the JSON schema
@return A Hamcrest matcher