Records HTTP API (JSON based) calls and compares the them on both HTTP and JSON level. This is helpful when migrating or refactoring APIs to make sure your API contract did not change. It also stores basic performance metrics.
As binary:
$ go get github.com/tgrk/apidiff
$ go install github.com/tgrk/apidiff/cmd/apidiff
As dependency:
$ go get gopkg.in/tgrk/apidiff.v1
$ apidiff -h
Usage: apidiff [OPTIONS] argument ...
-compare
compare recorded sessions against a URL
-del
list all recorded API sessions
-detail
view detail fo recorded API session
-dir string
path where API calls are stored (default $HOME/.apidiff/)
-list
list all recorded API sessions
-name string
name of session to be recorded
-record
record a new API session
-show
list all recorded API sessions
-v prints current program version
-verbose
output basic progress
Reads manifest file from both CLI arguments and STDIN:
appidiff -record -name "foo" examples/simple.yaml
$ cat examples/simple.yaml | ./appidiff -record -name "foo"
appidiff -list
appidiff -show "foo"
appidiff -detail "foo" 1
appidiff -del "foo"
Compare existing session against a manifest with other API:
appidiff -compare -name "bar" examples/simple.yaml