ajv-validator / ajv-validator/ajv-cli

Accept data on stdin

オープン
#32 コメント 11 件 リアクション 11 件 担当者 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 を短くまとめたダイジェスト。