Mocking and Specification Tool for API prototyping
cabal new-build
cabal new-exec smopeck CMD ARGS
This command launch a mock server accoding to spec file.
$ smopeck mock --host localhost --port 8888 example/hello.spec &
$ curl http://localhost:8888/hello
"hello world!"
This command generates a random value of Main
type in the spec file.
$ smopeck test example/simple.spec | jq .
{
"intField2": 62,
"booleanField": false,
"numberField": -59.61538462071759,
"stringField": "1552532052",
"intField1": 64,
"arrayField": [
{
"snd": "fuga",
"fst": 30
},
{
"snd": "hoge",
"fst": 31
},
{
"snd": "hoge",
"fst": 32
}
],
"nullField": null
}