OpenAPITools / OpenAPITools/openapi-generator
[REQ] [GO] Split request population from response handling
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Could the api function https://github.com/OpenAPITools/openapi-generator/blob/5047273f1e02eaf42944f92fcaaffb5a1577e75c/modules/openapi-generator/src/main/resources/go/api.mustache#L111 be split into two functions one for the request population and one for the response handling : i.e. one function for everything above https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/go/api.mustache#L340 and one for the rest.
This would mean we could add additional HTTP headers to the request if we need to or be a bit more granular about how the request is formed (e.g. for testing purposes). We could also test more easily the response handling.
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/api.mustache, especially the request-handling section around line 111 and the response-handling boundary around line 340. Review how this template produces Go API client methods; done means request population and response handling are separated so callers can add headers or test response handling independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100