openapi-generators / openapi-generators/openapi-python-client
Name conflict between `models.Response` and `types.Response`
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2k
- フォーク
- 293
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
説明
I ran into an OpenAPI spec which included a Response type. That caused a name conflict in the generated python code:
from ...models.response import Response
from ...types import Response
This was fixed easily enough using a class_overrides config, but since the classes in types.py are pretty generic I think it would be better if the classes were just fully qualified to avoid this kind of conflict.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、生成されたモデルと types.py 内のクラスがどのように命名され、インポートされるかを追跡します。Response 型を含む OpenAPI 仕様で競合を再現し、その後、生成された Python のインポートが競合しなくなり、class_overrides も引き続き使用できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- openapi, python
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100