Interface JsonSchemaFieldProcessor

  • All Known Implementing Classes:
    DefaultJsonSchemaFieldProcessor

    public interface JsonSchemaFieldProcessor
    The logic of json schema generation for some field in java object
    • Method Detail

      • applyCustomProcessing

        boolean applyCustomProcessing​(Class<?> objectClass,
                                      Field field,
                                      FieldMetadata fieldMetadata,
                                      jakarta.json.JsonObjectBuilder propertiesBuilder,
                                      List<String> requiredPropertiesOutput)
                               throws JsonSchemaPreparationException
        Applies non-default JSON schema preparation logic for the field
        Parameters:
        objectClass - the field owner class
        field - the target field
        fieldMetadata - field metadata containing the information about field name, default value etc
        propertiesBuilder - json object builder to be filled with field data
        requiredPropertiesOutput - for required fields the field name should be added
        Returns:
        true - custom processing is applied, false - custom processing is not required
        Throws:
        JsonSchemaPreparationException