class JsonPropertyIntrospector extends SwaggerAnnotationIntrospector {

  @SuppressWarnings("deprecation")
  @Override
  public String findEnumValue(Enum<?> value) {
    try {
      JsonProperty annotation = value.getClass().getField(value.name()).getAnnotation(JsonProperty.class);
      if (null == annotation || StringUtils.isEmpty(annotation.value())) {
        return super.findEnumValue(value);
      }
      return annotation.value();
    } catch (NoSuchFieldException e) {
      return super.findEnumValue(value);
    }
  }

}