danielgtaylor / danielgtaylor/openapi-cli-generator
Getting Started Issues
- 主要言語
- Go
- スター
- 218
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Petstore の Swagger ドキュメントを使用して、報告された `openapi-cli-generator generate petstore.yaml` の実行を再現し、ジェネレーターの文書化された OpenAPI サポートと比較します。次に、`openapiRegister(false)` と生成されたコマンドのエントリポイントを追跡し、コマンドがどのように登録され、どのコマンドが生成されるべきかを判断します。完了条件は、`$ref` の失敗、登録構文、および期待される生成 CLI コマンドを、動作する例とともに文書化することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go, openapi
- 領域
- cli, documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100