openapi-generators / openapi-generators/openapi-python-client

Calling the generator from cli works with different syntax from documentation

Open
#1,260 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
293
Avg merge
34m
Merged PRs (30d)
1

Description

Describe the bug

Calling from cli using the suggested method with python -m does not work.

python -m openapi-python-client --version
PATH_TO_PYTHON\python.exe: No module named openapi-python-client

Using underscores, however, does work (python -m openapi_python_client -version):

python -m openapi_python_client --version
openapi-python-client version: 0.24.3

OpenAPI Spec File

Not applicable

Desktop (please complete the following information):

  • OS: Windows 11 (Microsoft Windows NT 10.0.26100.0)
  • Python Version: [e.g. 3.12.7]
  • openapi-python-client version [e.g. 0.24.3]

Additional context

Running from a powershell instance in VSCode with a conda environment selected as a Python interpreter.

Would it be possible to add a line to the documentation mentioning the call with python -m?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the README location linked in the issue and compare its documented python -m invocation with the working underscore form shown in the report. Verify the command in the project’s CLI context, then update the documentation so the supported invocation is explicit and consistent. Done means a newcomer can follow the README command successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.