OpenAPITools / OpenAPITools/openapi-generator
protobuf model not support array enum
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
protobuf-schema template , model not support array enum
openapi-generator version
all version
OpenAPI declaration file content or url
"clientList": {
"type": "array",
"description": "client name",
"items": {
"type": "string",
"description": "client name",
"enum": [
"APP",
"M",
"PC"
]
}
}
Command line used for generation
Steps to reproduce
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/14892
Suggest a fix/enhancement
modules/openapi-generator/src/main/resources/protobuf-schema/model.mustache row 32 update
{{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}};
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modules/openapi-generator/src/main/resources/protobuf-schema/model.mustache around line 32 and review related issue #14892. Check how the provided array-of-enum declaration is rendered by the protobuf-schema model template. Done means the generated model correctly supports the clientList array enum case.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100