public AttributeCollector setEnum(ObjectNode node, Collection<?> enumValues, SchemaGenerationContext generationContext) {
        if (enumValues == null) {
            return this;
        }
        List<Object> values = enumValues.stream()
                .filter(this::isSupportedEnumValue)
                .filter(this::canBeConvertedToString)
                .collect(Collectors.toList());
        if (values.size() == 1 && generationContext.getGeneratorConfig().shouldRepresentSingleAllowedValueAsConst()) {
            this.addRawPropertyValue(node, generationContext.getKeyword(SchemaKeyword.TAG_CONST), values.get(0));
        } else if (!values.isEmpty()) {
            ArrayNode array = node.arrayNode();
            values.forEach(singleValue -> this.addRawArrayItem(array, singleValue));
            node.set(generationContext.getKeyword(SchemaKeyword.TAG_ENUM), array);
        }
        return this;
    }
Setter for "{@link SchemaKeyword#TAG_CONST}"/"{@link SchemaKeyword#TAG_ENUM}" attribute.

@param node schema node to set attribute on
@param enumValues attribute value to set
@param generationContext generation context, including configuration to apply when looking-up attribute values
@return this instance (for chaining)
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/AttributeCollector.java