`Input should be a valid string` for integer keys in openapi.yaml
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo il problema con l’openapi.yaml collegato e openapi-python-client 0.26.2, concentrandoti sulla response key in paths./api/events.get.responses.200. Il lavoro è completato quando le integer keys vengono accettate durante la generazione delle classi e trattate come strings invece di produrre il Pydantic validation error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 2k
- Fork
- 293
- Merge medio
- 34m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openapi-generators/openapi-python-client
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
openapi-generators/openapi-python-client#1451 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
openapi-generators/openapi-python-client#1435 · 1 commento ·
Tutte le issue di openapi-generators/openapi-python-client
Issue simili
-
from:qa priority:P2 reliability tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
spec-kitty/spec-kitty#4874 ·
-
fix: inaccuracy ⚠️
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
uabrc/uabrc.github.io#1255 · 1 commento ·
-
kind:bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ethereum-optimism/factory#64 ·