OpenAPITools / OpenAPITools/openapi-generator
[BUG][Go] Badly formated enum name
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Shared type is incorrectly formated (snake_case instead of camel case) and results in a non-exported type where it's properly camel_cased in other part of the code
openapi-generator version
4.3.0-Snapshot (latest docker image)
OpenAPI declaration file content or url
Steps to reproduce
Run the command above
Output
package openapi
type d string
// List of d
const (
A D = "A"
B D = "B"
)
Expected output
package openapi
type D string
// List of d
const (
A D = "A"
B D = "B"
)
Suggestion
Most probably a type writing function is missing a casing, it ca be worked around by using camel case in the specification.
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 the supplied OpenAPI declaration and run the generate command using -g go-server to reproduce the generated enum. Trace where the shared schema name is converted into the Go type name, then verify the generated output declares and references the exported type consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100