adobe / adobe/aio-cli-plugin-runtime

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

Đang mở
#189 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
21
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ lệnh `action get` và theo dõi cách tùy chọn `--url` hiện có định dạng URI của web action. Xem các bài kiểm thử CLI của lệnh, nếu có, và xác định tùy chọn mới nên hiển thị cả URL `.json` lẫn URL không có phần mở rộng như thế nào. Được xem là hoàn tất khi flag và đầu ra được chọn đã được triển khai mà không thay đổi hành vi hiện có của `--url`, với coverage cho cả hai URL.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
cli
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.