adobe / adobe/aio-cli-plugin-runtime

add new --url like flag on action get to show both .json and naked url for webactions

Offen
#189 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
JavaScript
Sterne
21
Forks
33
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Befehl `action get` und verfolge, wie dessen vorhandene Option `--url` die URI der Webaktion formatiert. Sieh dir die CLI-Tests des Befehls an, falls vorhanden, und ermittle, wie eine neue Option sowohl `.json`- als auch URLs ohne Dateiendung anzeigen sollte. Erledigt ist die Aufgabe, wenn das ausgewählte Flag und die Ausgabe implementiert sind, ohne das bestehende Verhalten von `--url` zu ändern, und beide URLs abgedeckt sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.