You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
851 B

9 years ago
  1. {
  2. "mocks": [
  3. {
  4. "route": "/one",
  5. "response": {
  6. "body": { "id": 1, "name": "whatever" }
  7. }
  8. },
  9. {
  10. "route": "/two",
  11. "request": { "accepts": "xml" },
  12. "response": {
  13. "body": "<result id='2' name='whatever' />"
  14. }
  15. },
  16. {
  17. "route": "/three",
  18. "targets": [
  19. {
  20. "request": { "method": "GET" },
  21. "response": {
  22. "body": { "id": 1, "name": "whatever" }
  23. }
  24. },
  25. {
  26. "request": { "method": "POST" },
  27. "response": {
  28. "status": 400,
  29. "body": { "message": "That method is not allowed." }
  30. }
  31. }
  32. ]
  33. },
  34. {
  35. "route": "/four",
  36. "module": "/mocks/four.js"
  37. },
  38. {
  39. "route": "/five/:id\\?name=:name",
  40. "module": "/mocks/five.js"
  41. }
  42. ]
  43. }