ajv-validator / ajv-validator/ajv-cli

Accept data on stdin

未關閉
#32 11 則留言 11 個 reaction 已指派 0 人 在 GitHub 檢視
feature
主要語言
TypeScript
星號
316
分支
77
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。