protected List<Object> getSerializedValuesFromJsonValue(ResolvedType javaType, Object[] enumConstants, SchemaGenerationContext context) {
        ResolvedMethod jsonValueAnnotatedEnumMethod = this.getJsonValueAnnotatedMethod(javaType, context);
        if (jsonValueAnnotatedEnumMethod == null) {
            return null;
        }
        try {
            List<Object> serializedJsonValues = new ArrayList<>(enumConstants.length);
            for (Object enumConstant : enumConstants) {
                serializedJsonValues.add(jsonValueAnnotatedEnumMethod.getRawMember().invoke(enumConstant));
            }
            return serializedJsonValues;
        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
            return null;
        }
    }
Check whether the given type is an enum with at least one constant value and a single {@link JsonValue} annotated method with
{@code value = true} and no expected arguments.

@param javaType encountered type during schema generation
@param enumConstants non-empty array of enum constants
@param context current generation context
@return results from invoking the {@link JsonValue} annotated method for each enum constant (or {@code null} if the criteria are not met)
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/CustomEnumDefinitionProvider.java