protected List<String> getSerializedValuesFromJsonProperty(ResolvedType javaType, Object[] enumConstants) {
        try {
            List<String> serializedJsonValues = new ArrayList<>(enumConstants.length);
            for (Object enumConstant : enumConstants) {
                String enumValueName = ((Enum<?>) enumConstant).name();
                Optional<JsonProperty> annotation = AnnotationHelper.resolveAnnotation(javaType.getErasedType().getDeclaredField(enumValueName),
                        JsonProperty.class, JacksonModule.NESTED_ANNOTATION_CHECK);
                if (!annotation.isPresent()) {
                    // enum constant without @JsonProperty annotation
                    return null;
                }
                final String annotationValue = annotation.get().value();
                serializedJsonValues.add(JsonProperty.USE_DEFAULT_NAME.equals(annotationValue) ? enumValueName : annotationValue);
            }
            return serializedJsonValues;
        } catch (NoSuchFieldException | SecurityException ex) {
            return null;
        }
    }
Check whether the given type is an enum with at least one constant value and each enum constant value has a {@link JsonProperty} annotation.

@param javaType encountered type during schema generation
@param enumConstants non-empty array of enum constants
@return annotated {@link JsonProperty#value()} 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