adobe / adobe/aio-cli-plugin-runtime
`aio rt api create` allows relpath without a leading slash
- Dominant language
- JavaScript
- Stars
- 21
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Start at the implementation of the `aio rt api create` command and its argument validation, comparing its handling of `basepath` and `relpath` with the stated `wsk` behavior. Reproduce the command without a leading slash, then make completion require the slash and verify that the invalid form errors instead of creating a joined endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100