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

@param method the method 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