openapi-generators / openapi-generators/openapi-python-client
`Input should be a valid string` for integer keys in openapi.yaml
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2k
- フォーク
- 293
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた openapi.yaml と openapi-python-client 0.26.2 を使って失敗を再現することから始め、paths./api/events.get.responses.200 にある response key に焦点を当ててください。クラス生成時に integer keys が受け入れられ、Pydantic validation error を発生させるのではなく strings として扱われるようになれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- openapi, python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100