Class RequiredFieldTransformer
java.lang.Object
com.atlassian.oai.validator.schema.transform.SchemaTransformer
com.atlassian.oai.validator.schema.transform.RequiredFieldTransformer
Transformer that adjusts the "required" fields list for nodes to remove fields marked as `readOnly` or `writeOnly`
for request / response validation as appropriate.
-
Field Summary
Fields inherited from class com.atlassian.oai.validator.schema.transform.SchemaTransformer
ADDITIONAL_PROPERTIES_FIELD, ALLOF_FIELD, ANYOF_FIELD, COMPONENTS_FIELD, DISCRIMINATOR_FIELD, ONEOF_FIELD, PROPERTIES_FIELD, READONLY_FIELD, REQUIRED_FIELD, SCHEMA_REF_FIELD, SCHEMAS_FIELD, TYPE_FIELD, WRITEONLY_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(com.fasterxml.jackson.databind.JsonNode schemaObject, SchemaTransformationContext context) Apply the schema transformation to the given node.static RequiredFieldTransformerMethods inherited from class com.atlassian.oai.validator.schema.transform.SchemaTransformer
allOf, anyOf, disableAdditionalProperties, getRequiredFieldNames, hasAdditionalFieldSet, hasAllOfField, hasDiscriminatorField, hasPropertiesField, hasRequiredFields, isArrayDefinition, isObjectDefinition, isReadOnly, isWriteOnly, itemsDefinition, oneOf, properties, property, schemaComponents, setRequiredFieldNames, setSchemaRef
-
Constructor Details
-
RequiredFieldTransformer
public RequiredFieldTransformer()
-
-
Method Details
-
getInstance
-
apply
public void apply(com.fasterxml.jackson.databind.JsonNode schemaObject, SchemaTransformationContext context) Description copied from class:SchemaTransformerApply the schema transformation to the given node.Note: Callers should assume that this will mutate the given schema object.
- Specified by:
applyin classSchemaTransformer
-