@Override
    public CustomDefinition provideCustomSchemaDefinition(ResolvedType javaType, SchemaGenerationContext context) {
        if (javaType == null) {
            // since 4.37.0: not for void methods
            return null;
        }
        Object[] enumConstants = javaType.getErasedType().getEnumConstants();
        if (enumConstants == null || enumConstants.length == 0) {
            return null;
        }
        List<?> serializedJsonValues = null;
        if (this.checkForJsonValueAnnotatedMethod) {
            serializedJsonValues = this.getSerializedValuesFromJsonValue(javaType, enumConstants, context);
        }
        if (serializedJsonValues == null && this.checkForJsonPropertyAnnotations) {
            serializedJsonValues = this.getSerializedValuesFromJsonProperty(javaType, enumConstants);
        }
        if (serializedJsonValues == null) {
            return null;
        }

        ObjectNode customNode = context.getGeneratorConfig().createObjectNode()
                .put(context.getKeyword(SchemaKeyword.TAG_TYPE), context.getKeyword(SchemaKeyword.TAG_TYPE_STRING));
        AttributeCollector standardAttributeCollector = new AttributeCollector(context.getGeneratorConfig().getObjectMapper());
        standardAttributeCollector.setEnum(customNode, serializedJsonValues, context);
        return new CustomDefinition(customNode);
    }
Constructor indicating how to attempt to serialise enum constant values. If both flags are provided as {@code true}, the {@link JsonValue}
annotated method will take precedence over {@link JsonProperty} annotations.

@param checkForJsonValueAnnotatedMethod whether a single {@link JsonValue} annotated method should be invoked on each enum constant value
@param checkForJsonPropertyAnnotations whether each enum constant's {@link JsonProperty} annotation's {@code value} should be used
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/CustomEnumDefinitionProvider.java