Getting Started Issues
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 20/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- go, openapi
- 领域
- cli, documentation
调研方向
使用 Petstore Swagger 文档重现报告中的 openapi-cli-generator generate petstore.yaml 运行,并将其与生成器文档中说明的 OpenAPI 支持进行比较。然后跟踪 openapiRegister(false) 和生成的命令入口点,以确定命令是如何注册的,以及应该生成哪些命令。完成标准是使用可运行的示例记录 $ref 失败、注册语法和预期生成的 CLI 命令。
由索引模型根据 Issue 内容生成。
描述
I want to build a cli from my company's api and I'm trying to get started with the openapi-cli-generator https://github.com/danielgtaylor/openapi-cli-generator but I'm running into some different errors.
I took the petstore demo api https://petstore.swagger.io/v2/swagger.json removed the top of the file comments and converted it to yaml using https://www.json2yaml.com/ then following the steps on the openapi-cli-generator github page, I run openapi-cli-generator generate petstore.yaml
and I get this type of error: Failed to resolve '#/definitions/Pet' in fragment in URI: 'definitions': Struct field not found: definitions which is complaining about lines like schema: "$ref": "#/definitions/Pet" in the yaml file. I tried replacing the $ref values with '' ex "$ref":"" and now I can run openapi-cli-generator generate petstore.yaml Was relacing the ref values with empty string the right thing to do? What is the nature of the problem.
Next, the git hub instructions say to add a line like openapiRegister(false) what is this supposed to do exactly? What does it mean to register a command? Are these the commands that will be part of the cli? What does the syntax look like? The github page doesn't give any examples
Is there supposed to be a one cli command per api call in the generated cli?
petstore-cli PetstoreFindPetsByStatus --help - unknown command "PetstoreFindPetsByStatus" for "petstore-cli.exe" (I need to register the command that I want?)
- 主要语言
- Go
- 星标
- 218
- 派生
- 53
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
danielgtaylor/openapi-cli-generator 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 35/100
danielgtaylor/openapi-cli-generator#45 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
danielgtaylor/openapi-cli-generator#44 · 3 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 35/100
danielgtaylor/openapi-cli-generator#41 · 1 条评论 ·
查看 danielgtaylor/openapi-cli-generator 的全部 Issue
相似的 Issue
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switch未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug iam-service
难度 2/5 1-3 小时 新手友好度 76/100
platform-mesh/platform-mesh#425 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
grafana/tempo-operator#1691 ·
维护者通常 1 天内回复
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes back可能已有人在做 @mge1512 今天认领。 未关闭bug
难度 1/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
slavakurilyak/awesome-ai-agents#827 ·
维护者通常 1 天内回复