You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from springdoc-openapi 1.6.6 to 1.6.7/1.6.13, the enum drop-down list is not visible in Swagger UI.
This issue looks like related to the previous one: #1663
I'm using a Spring MVC Converter to convert upper case to lower case.
@Component
public class FooBarConverter implements Converter<String, FooBar> {
@Override
public FooBar convert(String source) {
return FooBar.fromValue(source);
}
}
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public enum FooBar {
FOO("foo"),
BAR("bar");
private String value;
FooBar(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static FooBar fromValue(String value) {
for (FooBar b : FooBar.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
To Reproduce
What version of spring-boot you are using?
I've tested with Spring Boot 2.7.6 and 2.6.8
What modules and versions of springdoc-openapi are you using?
1.6.6 works
1.6.7 and 1.6.13 does'nt
Describe the bug
After upgrading from springdoc-openapi 1.6.6 to 1.6.7/1.6.13, the enum drop-down list is not visible in Swagger UI.
This issue looks like related to the previous one: #1663
I'm using a Spring MVC Converter to convert upper case to lower case.
To Reproduce
What version of spring-boot you are using?
I've tested with Spring Boot 2.7.6 and 2.6.8
What modules and versions of springdoc-openapi are you using?
1.6.6 works
1.6.7 and 1.6.13 does'nt
Provide with a sample code (HelloController) or Test that reproduces the problem
I've cloned @solita-alperttiti sample and adapt it; https://github.com/arey/springdoc-enum-example
The diff could be check at this commit: arey/springdoc-enum-example@078bdec
Expected behavior
I would like to see a drop down list on Swagger UI
Screenshots
See the sample repository: https://github.com/arey/springdoc-enum-example
The text was updated successfully, but these errors were encountered: