Skip to content

$ref in path parameters doesn't seem to work #605

Open
@jrobbins-LiveData

Description

@jrobbins-LiveData

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions