> npx @stoplight/prism-cli mock swagger.json &
[12:37:27 PM] › [CLI] … awaiting Starting Prism…
[12:37:27 PM] › [CLI] ℹ info GET http://127.0.0.1:4010/IsUserLeaderOfGroup
[12:37:27 PM] › [CLI] ℹ info GET http://127.0.0.1:4010/IsUserMemberOfGroup
...
[12:37:27 PM] › [CLI] ▶ start Prism is listening on http://127.0.0.1:4010
> curl 'localhost:4010/getUserInfo?username=nobody'
[12:38:33 PM] › [HTTP SERVER] get /getUserInfo ℹ info Request received
[12:38:33 PM] › [NEGOTIATOR] ℹ info Request contains an accept header: */*
[12:38:33 PM] › [VALIDATOR] ✔ success The request passed the validation rules. Looking for the best response
[12:38:33 PM] › [NEGOTIATOR] ✔ success Found a compatible content for */*
[12:38:33 PM] › [NEGOTIATOR] ✔ success Responding with the requested status code 200
[12:38:33 PM] › [NEGOTIATOR] ℹ info > Responding with "200"
{"banned":true,"expirationdate":"string","fullname":"string","groupaccount":"string","status":true,"uid":0,"vopersonid":"string"}
We don't even have to write anything, tools already exist, for example https://github.com/stoplightio/prism