Bug Report Checklist
Description
When generating the enums client is acutally stripping the enum name.
I have two enum constant TEST_PACKAGE , TEST_RESULT_FILE.
But when openapi generating the yaml into java client it is stripping the TEST_ from name .
YAML FILE
FileType:
type: string
description: File type indicates test file or test run result
enum:
- TEST_PACKAGE
- TEST_RESULT_FILE
generated output is
@JsonAdapter(FileType.Adapter.class)
public enum FileType {
PACKAGE("TEST_PACKAGE"),
RESULT_FILE("TEST_RESULT_FILE");
}
However expected output is
@JsonAdapter(FileType.Adapter.class)
public enum FileType {
TEST_PACKAGE("PACKAGE"),
TEST_RESULT_FILE("RESULT_FILE");
openapi-generator version
6.4.0
OpenAPI declaration file content or url
https://github.com/SUSHIL161/openapi/blob/main/openapi.yaml
Generation Details
Url of xml file
https://github.com/SUSHIL161/openapi/blob/main/openaapi.xml
org.openapitools
openapi-generator-maven-plugin
6.4.0
generate
${project.basedir}/../openapi/target/classes/openapi.yaml
java
rest-assured
${project.build.directory}/generated-sources
${project.groupId}.sdk.api
${project.groupId}.sdk.models
${project.groupId}.sdk
false
false
java8-localdatetime
java
CLIENT
false
false
Steps to reproduce
https://github.com/SUSHIL161/openapi/blob/main/openapi.yaml
generate java client from above file and check the model class FileType
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
When generating the enums client is acutally stripping the enum name.
I have two enum constant TEST_PACKAGE , TEST_RESULT_FILE.
But when openapi generating the yaml into java client it is stripping the TEST_ from name .
YAML FILE
generated output is
@JsonAdapter(FileType.Adapter.class)
public enum FileType {
PACKAGE("TEST_PACKAGE"),
RESULT_FILE("TEST_RESULT_FILE");
}
However expected output is
@JsonAdapter(FileType.Adapter.class)
public enum FileType {
TEST_PACKAGE("PACKAGE"),
TEST_RESULT_FILE("RESULT_FILE");
openapi-generator version
6.4.0
OpenAPI declaration file content or url
https://github.com/SUSHIL161/openapi/blob/main/openapi.yaml
Generation Details
Url of xml file
https://github.com/SUSHIL161/openapi/blob/main/openaapi.xml
Steps to reproduce
https://github.com/SUSHIL161/openapi/blob/main/openapi.yaml
generate java client from above file and check the model class FileType
Related issues/PRs
Suggest a fix