openapi-generators / openapi-generators/openapi-python-client

Parsing Error

Aperta
#1,197 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
2k
Fork
293
Merge medio
34m
PR unite (30g)
1

Descrizione

Describe the bug
I tried to parse the v3 openapi specification as can be downloaded here
https://apidocs.wyscout.com/
I ran

poetry run openapi-python-client generate --path path_to_file

It worked halfway. Quite a few of the model files were generated, but it was incomplete.
The error message I got was

File name too long: 
'[...]wyscout-api-v-3-client/wyscout_api_v_3_client/models/match_events_a_response_element_object_substitution_fetch_the_substitutions_related_to_the_team_with_id_team_id_the_substitutions_related_to_match_p
eriod_match_period_the_substitution_that_happened_at_start_sec_seconds_elapsed_from_the_start_the_entrance_of_a_player_as_a_substitute.py'

which suggested that some fields that were not meant for parsing got parsed into a header.

OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.

Desktop (please complete the following information):

  • MacOS 15.1.1 (24B91)
  • Python Version: 3.12.7
  • openapi-python-client version 0.23.1

Additional context
Thank you for your help

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia scaricando il documento Wyscout OpenAPI v3 ed esegui nuovamente poetry run openapi-python-client generate --path path_to_file con openapi-python-client 0.23.1. Traccia la generazione del nome del file del modello indicata dal percorso models/match_events...py e determina in che modo i campi analizzati lunghi producono l’errore del filesystem. Il lavoro è completato quando la specifica viene generata senza un errore filename-too-long e l’output è completo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
openapi, python
Ambito
api, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.