$ref in path parameters doesn't seem to work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start with the linked test-schema.yaml in the reproducible openapi-ref-issue repository and run the generator using the reported openapi-python-client version. Compare the generated sync entry point with the noref example, focusing on resolution of the parameter $ref. Done means the generated API includes the optional page kwarg in the referenced-parameter case as well.
Written by the indexing model from the issue text.
Description
Describe the bug
If a get path has a parameter using $ref to point to #/components/parameters, the generated API lacks the corresponding kwarg. If one "hoists" the indirect parameter up into the path's parameters, it works as expected.
To Reproduce
See this repo for a reproducible example.
And see this repo for the same schema without the $ref, working as expected.
Expected behavior
I expect to see the optional page kwarg in both generated APIs.
I see this in the $ref example:
def sync(
*,
client: Client,
) -> Optional[List[str]]:
and this in the noref example:
def sync(
*,
client: Client,
page: Union[Unset, None, GetTestPage] = UNSET,
) -> Optional[List[str]]:
OpenAPI Spec File
A link to your openapi.json which produces this issue.
Desktop (please complete the following information):
- OS: Microsoft Windows 10 Pro 10.0.19044 Build 19044
- Python Version: 3.9.12
- openapi-python-client version 0.11.1
- Dominant language
- Python
- Stars
- 2k
- Forks
- 293
- Avg merge
- 34m
- Merged PRs (30d)
- 1
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.
More from openapi-generators/openapi-python-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
openapi-generators/openapi-python-client#1451 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
openapi-generators/openapi-python-client#1435 · 1 comment ·
All issues in openapi-generators/openapi-python-client
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·