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
Got to integration-tests/enum-property/src/main/openapi/enum-property.yaml. Change type for enum from string to number and enum values from 'text' to 1:
Compile it and check generated org.openapi.quarkus.enum_property_yaml.model.Message class. It will contain enum value -
@JsonIgnoreProperties(ignoreUnknown = true)
public class Message {
public enum MsgTypeEnum {
NUMBER_1(BigDecimal.valueOf(new BigDecimal("1"))); // THIS IS NOT COMPILING
// caching enum access
private static final java.util.EnumSet<MsgTypeEnum> values = java.util.EnumSet.allOf(MsgTypeEnum.class);
BigDecimal value;
BigDecimal.valueOf(new BigDecimal("1")) this part can not compile
The text was updated successfully, but these errors were encountered:
Can you send a PR to fix this? Just change the pojo.qute template file to verify if the enum is a number and generate it correctly. What's the compilation error?
Shohou
pushed a commit
to Shohou/quarkus-openapi-generator
that referenced
this issue
May 16, 2024
Got to
integration-tests/enum-property/src/main/openapi/enum-property.yaml
. Change type for enum fromstring
tonumber
and enum values from'text'
to1
:Compile it and check generated
org.openapi.quarkus.enum_property_yaml.model.Message
class. It will contain enum value -BigDecimal.valueOf(new BigDecimal("1"))
this part can not compileThe text was updated successfully, but these errors were encountered: