Conflicting module names for models silently generate invalid code
まだ誰も着手していません。
評価
調査の方向性
リンクされた Netbox OpenAPI 仕様を使って生成を再現し、生成されたモデルと models/init.py を調査します。モデル生成の経路を追跡して VLAN と Vlan がどのように命名されるかを確認し、その後、生成されたモデルとそれらの import の両方が引き続き有効であることを示すカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I am generating a Python Client using the OpenAPI model of Netbox 3.6.9 (with a few plugins pre-installed).
This schema contains for example a model VLAN and a model Vlan.
However, in the generated client, only the model Vlan is generated, but the models/__init__.py still tries to import VLAN.
OpenAPI Spec File
https://gist.github.com/linkdd/3193453b38357d190545c7988cdac692
Desktop:
- OS: Debian 12
- Python Version: 3.12
- openapi-python-client version 0.21.6
Additional context
At $day_job, it was a blocking point, we had to remove temporarily the dependency to the generated client. I added a few tasks to my backlog in order to tackle this issue myself and ideally come up with a PR, but it won't be soon. Any help or information on how/where the model generation actually happens would be awesome and a huge time saver.
- 主要言語
- Python
- スター
- 2k
- フォーク
- 293
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openapi-generators/openapi-python-client のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
openapi-generators/openapi-python-client#1451 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
openapi-generators/openapi-python-client#1435 · コメント 1 件 ·
openapi-generators/openapi-python-client の issue をすべて見る
似ている issue
-
🐛 Bug 🔔 Pending processing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·