adobe / adobe/aio-cli-plugin-runtime
add new --url like flag on action get to show both .json and naked url for webactions
还没有人认领这个 Issue。
- 主要语言
- 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?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 action get 命令开始,跟踪其现有的 --url 选项如何格式化 web action URI。查看该命令的 CLI 测试(如果有),并确定新选项应如何同时显示 .json URL 和不带扩展名的 URL。完成的标准是:在不改变现有 --url 行为的情况下,实现所选 flag 和输出,并覆盖这两种 URL。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100