Skip to content

Could not find reference in parsed models, when components title is different from the name #342

Closed
@dongfangtianyu

Description

@dongfangtianyu

Describe the bug
Could not find reference in parsed models, when components title is different from the name
for example :dongfangtianyu@add365f

To Reproduce

git remote add dongfang  git@github.com:dongfangtianyu/openapi-python-client.git
git fetch dongfang 
git checkout  dongfang/debug
task re

Output

Generating my-test-api-client
Warning(s) encountered while generating. Client was generated, but some pieces may be missing

WARNING parsing GET /test/model_title_diff_name within default.

Cannot parse response for status code 200, response will be ommitted from generated client

Reference(ref='#/components/schemas/Page_AdminTodoOut_')

Desktop (please complete the following information):

  • openapi-python-client version 0.8.0

Additional context

Problems may arise in: https://github.com/triaxtec/openapi-python-client/blob/main/openapi_python_client/parser/properties/__init__.py#L444

reference.class_name == "Page_AdminTodoOut_"
schemas.models == {
    "PageAdminTodoOut":  ModelProperty(....),
    ....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions