Description
Describe the bug
If a requestBody
is declared with a $ref
, then no json_body
property is generated. If the reference is inlined, then json_body
is generated.
To Reproduce
Steps to reproduce the behaviour:
- Example schema:
paths:
"/objects":
post:
operationId: object_create
requestBody:
$ref: "#/components/requestBodies/Object"
- generated API is:
def sync_detailed(
*,
client: Client,
) -> Response[Object]:
"""
Returns:
Response[Object]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
Expected behavior
The expected API should be:
def sync_detailed(
*,
client: Client,
json_body: Object,
) -> Response[Object]:
"""
Args:
json_body (Object):
Returns:
Response[Object]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
OpenAPI Spec File
test.yaml