public static ObjectNode collectFieldAttributes(FieldScope field, SchemaGenerationContext generationContext) {
        SchemaGeneratorConfig config = generationContext.getGeneratorConfig();
        ObjectNode node = config.createObjectNode();
        AttributeCollector collector = new AttributeCollector(config.getObjectMapper());
        collector.setTitle(node, config.resolveTitle(field), generationContext);
        collector.setDescription(node, config.resolveDescription(field), generationContext);
        collector.setDefault(node, config.resolveDefault(field), generationContext);
        collector.setEnum(node, config.resolveEnum(field), generationContext);
        collector.setReadOnly(node, config.isReadOnly(field), generationContext);
        collector.setWriteOnly(node, config.isWriteOnly(field), generationContext);
        collector.setAdditionalProperties(node, config.resolveAdditionalProperties(field, generationContext), generationContext);
        collector.setPatternProperties(node, config.resolvePatternProperties(field, generationContext), generationContext);
        collector.setStringMinLength(node, config.resolveStringMinLength(field), generationContext);
        collector.setStringMaxLength(node, config.resolveStringMaxLength(field), generationContext);
        collector.setStringFormat(node, config.resolveStringFormat(field), generationContext);
        collector.setStringPattern(node, config.resolveStringPattern(field), generationContext);
        collector.setNumberInclusiveMinimum(node, config.resolveNumberInclusiveMinimum(field), generationContext);
        collector.setNumberExclusiveMinimum(node, config.resolveNumberExclusiveMinimum(field), generationContext);
        collector.setNumberInclusiveMaximum(node, config.resolveNumberInclusiveMaximum(field), generationContext);
        collector.setNumberExclusiveMaximum(node, config.resolveNumberExclusiveMaximum(field), generationContext);
        collector.setNumberMultipleOf(node, config.resolveNumberMultipleOf(field), generationContext);
        collector.setArrayMinItems(node, config.resolveArrayMinItems(field), generationContext);
        collector.setArrayMaxItems(node, config.resolveArrayMaxItems(field), generationContext);
        collector.setArrayUniqueItems(node, config.resolveArrayUniqueItems(field), generationContext);
        config.getFieldAttributeOverrides()
                .forEach(override -> override.overrideInstanceAttributes(node, field, generationContext));
        return node;
    }
Collect a field's contextual attributes (i.e. everything not related to the structure).

@param field the field for which to collect JSON schema attributes
@param generationContext generation context, including configuration to apply when looking-up attribute values
@return node holding all collected attributes (possibly empty)
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/AttributeCollector.java