OpenAPITools / OpenAPITools/openapi-generator
[REQ] [go-server] Add option to enable unknown fields
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I want to be able to allow unknown fields. The configuration is here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache#L596. If using any additional properties, it is not possible any more to remove this line.
Describe the solution you'd like
I would like to have an additional property for disabling disallowUnknownFields.
Describe alternatives you've considered
Manually editing the file after every generation.
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/go-server/controller-api.mustache at the referenced configuration line and inspect how generator properties are exposed to the template. Add the requested option so generated Go servers can allow unknown fields, then verify the generated output with the relevant go-server generation checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100