openapi-generators / openapi-generators/openapi-python-client
Parsing Error
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 2k
- Forks
- 293
- Merge médio
- 34min
- PRs com merge (30d)
- 1
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece baixando o documento Wyscout OpenAPI v3 e executando novamente poetry run openapi-python-client generate --path path_to_file com openapi-python-client 0.23.1. Rastreie a geração do nome de arquivo do modelo indicada pelo caminho models/match_events...py e determine como os campos analisados longos produzem o erro do sistema de arquivos. Considera-se concluído quando a especificação é gerada sem um erro filename-too-long e a saída está completa.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- openapi, python
- Domínio
- api, tooling
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100