ng-apimock
Version:
Node plugin that provides the ability to use scenario based api mocking of angular apps
27 lines (24 loc) • 592 B
JSON
{
"expression": "online\/rest\/some\/api\/.*\/and\/.*",
"method": "GET",
"name": "list",
"isArray": true,
"responses": {
"groceries": {
"status": 200,
"data": [{"title":"buy %%numberOfApples%% apples from %%who%%"}, {"title": "buy"}],
"headers": {"Content-type":"application/json"},
"statusText": "text"
},
"wishes": {
"data": [{"title":"Ferrari f40"}, {"title": "Koenigsegg One:1"}]
},
"other": {
"data": [{"title":"Red-bull RB13"}],
"delay": 4000
},
"internal-server-error": {
"status":500
}
}
}