`Input should be a valid string` for integer keys in openapi.yaml
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
リンクされた openapi.yaml と openapi-python-client 0.26.2 を使って失敗を再現することから始め、paths./api/events.get.responses.200 にある response key に焦点を当ててください。クラス生成時に integer keys が受け入れられ、Pydantic validation error を発生させるのではなく strings として扱われるようになれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error:
paths./api/events.get.responses.200.[key]
Input should be a valid string [type=string_type, input_value=200, input_type=int]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
Is there a chance to ignore those errors and fall back to string for integer keys?
OpenAPI Spec File
Link to an OpenAPI document
Desktop (please complete the following information):
- OS: macOS 26.0.1
- Python Version: 13.3
- openapi-python-client version: 0.26.2
- 主要言語
- 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
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
canonical/paas-charm#368 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
StevenBlack/hosts#3256 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
qualcomm/qai-appbuilder#275 ·