We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If an enum is added into external json file Swagger Codegen does not generate model correctly. Example project: https://github.com/abhijith-prabhakar/swagger-ref-error-demo/blob/master/src/main/resources/v1/schema/title/title.json#L43
"media_types": { "description": "different media types", "type": "array", "items" : { "type" : "string", "enum" : [ "application/pdf", "application/json" ] } },
Generated Code
/** * different media types */ public enum List<MediaTypesEnum> { PDF("application/pdf"), JSON("application/json"); private List<String> value; List<MediaTypesEnum>(List<String> value) { this.value = value; } @Override @JsonValue public String toString() { return String.valueOf(value); } }
The text was updated successfully, but these errors were encountered:
Hi, I'm having same problem i think. Tried generating resteasy server from yaml with:
TaskType: type: string description: "Tipo de tarea asociada. cancelación, agenda, etc." enum: - cancelation - schedule
with resulting generated enum:
public enum TaskType { {values=[cancelation, schedule], enumVars=[{name=CANCELATION, value="cancelation"}, {name=SCHEDULE, value="schedule"}]}, }
If I use jaxrs server generator instead of resteasy it works fine.
Sorry, something went wrong.
No branches or pull requests
If an enum is added into external json file Swagger Codegen does not generate model correctly.
Example project: https://github.com/abhijith-prabhakar/swagger-ref-error-demo/blob/master/src/main/resources/v1/schema/title/title.json#L43
Generated Code
The text was updated successfully, but these errors were encountered: