OpenAPITools / OpenAPITools/openapi-generator

Parameters in the body in the spec supplied directly to the function

Open
#22,171 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.