Skip to content

[BUG][python][python-experimental] api_endpoints generated by python experimental are not included in installs #12050

@MAKOMO

Description

@MAKOMO

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Installing a client generated using the python-experimental generator does not include the api_endpoints because the empty init.py files for those submodules are not generated.

The generated code looks like this:

client/<app>/
  __init__.py
  api/
    __init__.py
   <name>_api.py
   <name>_api_endpoints/<method>.py

but should look like this

client/<app>/
  __init__.py
  api/
    __init__.py
    <name>_api.py
    <name>_api_endpoints/<method>.py
      __init__py

Note that additional __init__.py in directory <name>_api_endpoints/

As the __init__py in directory <name>_api_endpoints/ is missing, <method>.py does not get installed by setup.py

openapi-generator version

trunk of today

OpenAPI declaration file content or url
Generation Details

Using python-experimental

Steps to reproduce
Related issues/PRs
Suggest a fix

The generator should add those missing __init__.py files in the <api>_api_endpoints subdirectories

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions