Skip to content

Generated service code uses broken import names #129

@joemckie

Description

@joemckie

Describe the bug

Generating code results in incorrect output for services

To Reproduce

  1. Generate API spec using openapi-python-generator https://listrr.pro/swagger/v1/swagger.json listrr --use-orjson --formatter none (disabling the formatter is required, as this bug causes generation to break completely)
  2. In the generated service files, check the output types, you should see something like:
() -> listrr.Contracts.Models.ListrrList
() -> listrr.Contracts.Models.API.PagedResponse`1[listrr.Contracts.Models.ListrrList]

Expected behavior

The services should use the correct models, e.g. for the above example:

() -> listrrContractsModelsListrrList
() -> listrrContractsModelsAPIPagedResponse1listrrContractsModelsListrrList

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions