openapi-generators / openapi-generators/openapi-python-client
Parsing Error
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 2k
- 派生
- 293
- 平均合并
- 34 分钟
- 30 天内合并 PR
- 1
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先下载 Wyscout OpenAPI v3 文档,并使用 openapi-python-client 0.23.1 重新运行 poetry run openapi-python-client generate --path path_to_file。跟踪 models/match_events...py 路径所指示的模型文件名生成过程,并确定解析后的长字段如何产生文件系统错误。完成的标准是:规范能够生成且不出现 filename-too-long 错误,并且输出完整。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- openapi, python
- 领域
- api, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100