OpenAPITools / OpenAPITools/openapi-generator
Parameters in the body in the spec supplied directly to the function
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I generated a SDK using the openAPI generator. However, in my spec, I have a body which accepts a few parameters and in the client SDK, when I want put the parameters, I have to create a request object with the params and pass it to the function.
Something similar to
req = MakeItemRequest(item_name="item12", item_type="glass")
result = client.create_item(req)
Instead of the above, is there a way to do:
result = client.create_item(item_name="item12", item_type="glass")
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
The issue does not name a generator template, target SDK language, source file, or test; first identify which generated client languages and operation templates should support direct body parameters. Check the relevant generator behavior and existing request-object tests, then confirm that the generated client accepts the proposed arguments while preserving existing request-object usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100