public static ObjectNode collectTypeAttributes(TypeScope scope, SchemaGenerationContext generationContext,
            Set<String> allowedSchemaTypes) {
        SchemaGeneratorConfig config = generationContext.getGeneratorConfig();
        ObjectNode node = config.createObjectNode();
        AttributeCollector collector = new AttributeCollector(config.getObjectMapper());
        collector.setId(node, config.resolveIdForType(scope), generationContext);
        collector.setAnchor(node, config.resolveAnchorForType(scope), generationContext);
        collector.setTitle(node, config.resolveTitleForType(scope), generationContext);
        collector.setDescription(node, config.resolveDescriptionForType(scope), generationContext);
        collector.setDefault(node, config.resolveDefaultForType(scope), generationContext);
        collector.setEnum(node, config.resolveEnumForType(scope), generationContext);
        if (isListEmptyOrContainingAtLeastOne(allowedSchemaTypes, config, SchemaKeyword.TAG_TYPE_OBJECT)) {
            collector.setAdditionalProperties(node, config.resolveAdditionalPropertiesForType(scope, generationContext), generationContext);
            collector.setPatternProperties(node, config.resolvePatternPropertiesForType(scope, generationContext), generationContext);
        }
        if (isListEmptyOrContainingAtLeastOne(allowedSchemaTypes, config, SchemaKeyword.TAG_TYPE_STRING)) {
            collector.setStringMinLength(node, config.resolveStringMinLengthForType(scope), generationContext);
            collector.setStringMaxLength(node, config.resolveStringMaxLengthForType(scope), generationContext);
            collector.setStringFormat(node, config.resolveStringFormatForType(scope), generationContext);
            collector.setStringPattern(node, config.resolveStringPatternForType(scope), generationContext);
        }
        if (isListEmptyOrContainingAtLeastOne(allowedSchemaTypes, config, SchemaKeyword.TAG_TYPE_INTEGER, SchemaKeyword.TAG_TYPE_NUMBER)) {
            collector.setNumberInclusiveMinimum(node, config.resolveNumberInclusiveMinimumForType(scope), generationContext);
            collector.setNumberExclusiveMinimum(node, config.resolveNumberExclusiveMinimumForType(scope), generationContext);
            collector.setNumberInclusiveMaximum(node, config.resolveNumberInclusiveMaximumForType(scope), generationContext);
            collector.setNumberExclusiveMaximum(node, config.resolveNumberExclusiveMaximumForType(scope), generationContext);
            collector.setNumberMultipleOf(node, config.resolveNumberMultipleOfForType(scope), generationContext);
        }
        if (isListEmptyOrContainingAtLeastOne(allowedSchemaTypes, config, SchemaKeyword.TAG_TYPE_ARRAY)) {
            collector.setArrayMinItems(node, config.resolveArrayMinItemsForType(scope), generationContext);
            collector.setArrayMaxItems(node, config.resolveArrayMaxItemsForType(scope), generationContext);
            collector.setArrayUniqueItems(node, config.resolveArrayUniqueItemsForType(scope), generationContext);
        }
        return node;
    }
Collect a given scope's general type attributes (i.e. everything not related to the structure).

@param scope the scope/type representation for which to collect JSON schema attributes
@param generationContext generation context, including configuration to apply when looking-up attribute values
@param allowedSchemaTypes declared schema types determining which attributes are meaningful to be included
@return node holding all collected attributes (possibly empty)
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/AttributeCollector.java