ajv-validator / ajv-validator/ajv-cli

Accept data on stdin

Đang mở
#32 11 bình luận 11 reaction 0 người được giao Xem trên GitHub
feature
Ngôn ngữ chính
TypeScript
Star
316
Fork
77
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The most common way I've noticed many people do casual testing of API responses is with curl.
In particular some back-end devs really prefer the command line, which makes ajv-cli great for this purpose. Would it be possible for ajv-cli to take the data JSON from stdin so that

```CONSOLE
$ curl -X PUT "https://api.example.com/foos/506e3185e9c882d175a2d0cb0093d9f2" \
-H "Content-Type: application/json" \
--data '{"id":"506e3185e9c882d175a2d0cb0093d9f2","bar":"1234"}' \
| ajv validate -s foos-response.json
```

works? And likewise for `ajv test`. This of course is more to allow people to poke at things with minimal setup than something intended for a large scale test automation / CI system.

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.