public final class ResponseAnalyzer extends Object
Modifier and Type | Method and Description |
---|---|
static JsonNode |
contentWithoutWriteOnly(JsonNode content,
List<JsonPointer> contentWriteOnly)
Return the given content after removing values for all "writeOnly" properties.
|
static List<JsonPointer> |
contentWriteOnly(JsonNode content,
List<JsonPointer> schemaWriteOnly)
Returns the location of each "writeOnly" object property defined in the given content.
|
static JsonNode |
schemaWithoutWriteOnly(JsonNode schema,
List<JsonPointer> schemaWriteOnly)
Return the given schema after removing definitions for all "writeOnly" properties.
|
static List<JsonPointer> |
schemaWriteOnly(JsonNode schema)
Returns the location of each "writeOnly" object property defined in the given schema.
|
static Optional<List<SchemaValidationError>> |
validate(JsonNode schema,
List<JsonNode> contentAlternatives,
boolean writeOnlyInvalid)
If any content alternative satisfies the schema, returns
Optional.empty() . |
public static List<JsonPointer> schemaWriteOnly(JsonNode schema)
public static List<JsonPointer> contentWriteOnly(JsonNode content, List<JsonPointer> schemaWriteOnly)
public static JsonNode schemaWithoutWriteOnly(JsonNode schema, List<JsonPointer> schemaWriteOnly)
public static JsonNode contentWithoutWriteOnly(JsonNode content, List<JsonPointer> contentWriteOnly)
public static Optional<List<SchemaValidationError>> validate(JsonNode schema, List<JsonNode> contentAlternatives, boolean writeOnlyInvalid) throws Exception
Optional.empty()
. Otherwise, returns
a list of validation errors. If writeOnlyInvalid
is true, returns a validation
error for each occurrence of a "writeOnly" property.Exception
Copyright © 2024 The Cornutum Project. All rights reserved.