adobe / adobe/aio-cli-plugin-runtime
add new --url like flag on action get to show both .json and naked url for webactions
- Langage dominant
- JavaScript
- Étoiles
- 21
- Forks
- 33
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
**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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la commande `action get` et suivez la manière dont son option existante `--url` formate l’URI de l’action web. Examinez les tests CLI de la commande, s’ils existent, et déterminez comment une nouvelle option devrait afficher à la fois les URL `.json` et les URL nues. C’est terminé lorsque le flag choisi et la sortie sont implémentés sans modifier le comportement existant de `--url`, avec une couverture pour les deux URL.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100