adobe / adobe/aio-cli-plugin-runtime
`aio rt api create` allows relpath without a leading slash
未关闭
bug
- 主要语言
- JavaScript
- 星标
- 21
- 派生
- 33
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently users can run `aio rt api create basepath relpath ...` and it will succeed, producing an endpoint like https://adobeioruntime.net/apis/namespace/basepathrelpath
On the other hand, `wsk` requires that relpath begins with a `/`, to separate the basepath and relpath, and if users don't include it, the command produces an error:
```
error: Unable to parse api command arguments: 'relpath' must begin with '/'.
```
We should update `aio rt api create` to match this `wsk` behavior
贡献指南
调研方向
从 `aio rt api create` 命令的实现及其参数验证入手,将其对 `basepath` 和 `relpath` 的处理方式与所述的 `wsk` 行为进行比较。在不带前导斜杠的情况下重现该命令,然后使补全要求使用斜杠,并验证无效形式会报错,而不是创建拼接后的端点。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 50/100