adobe / adobe/aio-cli-plugin-runtime

add new --url like flag on action get to show both .json and naked url for webactions

オープン
#189 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
JavaScript
スター
21
フォーク
33
PR マージ指標
30日以内にマージされた PR はありません

説明

**Is your feature request related to a problem? Please describe.**

When a web action is created, it can be invoked in two ways. One with a URI that adds a `.json` extension and without. The latter only works if the action actually returns a responses that conforms to the HTTP schema (e.g., has a body, status code and headers). If the body is missing when the latter URI is is used, the HTTP response is 204 No Content. This can be confusing for developers.

Rather than change the behavior of `action get --url` which currently return the naked URI (no .json), I think it would be better to add a new flag to list both URI. WDYT?

**Describe the solution you'd like**
```
> ... action get foo --url-all
The URL to invoke this web action is:
https://example.com/api/v1/web/namespace/package/foo.json

Or use this URL if your action result conforms to the HTTP web action schema:
https://example.com/api/v1/web/namespace/package/foo
```
**Describe alternatives you've considered**
An alternative is for `--url` to accept an optional value `--url all`.
What are some better flag names?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`action get` コマンドから始め、既存の `--url` オプションが web action URI をどのようにフォーマットしているかを追跡します。存在する場合は、コマンドの CLI テストを確認し、新しいオプションで `.json` URL と拡張子のない URL の両方をどのように表示すべきかを判断します。選択した flag と出力が、既存の `--url` の動作を変更せずに実装され、両方の URL がカバレッジに含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
cli
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。