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

Getting "Invalid YAML from provided source" error although it worked with Postman and the spec format is JSON

未关闭
#1,094 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
2k
派生
293
平均合并
34 分钟
30 天内合并 PR
1

描述

I am trying to generate a client for an OpenAPI JSON file but I am getting an error although Postman was able to generate a endpoints:
"Error(s) encountered while generating, client was not created
Invalid YAML from provided source: mapping values are not allowed in this context"

This is the link to the OpenAPI spec: https://github.com/sourcenetwork/defradb/blob/develop/docs/website/references/http/openapi.json

Desktop (please complete the following information):

  • OS: Windows 11
  • Python Version: 3.12.5
  • openapi-python-client version: 0.21.2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

下载链接中的 openapi.json,并在 Python 3.12.5 上使用 openapi-python-client 0.21.2 重现失败,然后检查生成器如何解析提供的 JSON 与 YAML。链接的规范被接受,并且客户端生成在没有报告的解析错误的情况下完成,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
openapi, python
领域
tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。