adobe / adobe/aio-cli-plugin-runtime
add new --url like flag on action get to show both .json and naked url for webactions
- Lingua principale
- JavaScript
- Stelle
- 21
- Fork
- 33
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal comando `action get` e traccia il modo in cui la sua opzione esistente `--url` formatta l’URI dell’azione web. Esamina i test CLI del comando, se presenti, e determina come una nuova opzione dovrebbe visualizzare sia gli URL `.json` sia gli URL nudi. Il lavoro è completo quando il flag scelto e l’output sono implementati senza modificare il comportamento esistente di `--url`, con una copertura per entrambi gli URL.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100