0.0.5 • Published 4 years ago

api-double v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Stub Server with UI

Development tool for stubbing REST API and Websocket messages, with a user-friendly UI useful for local development and a developer-friendly API useful for end to end testing, with specific helpers for Cypress.

An example of stub endpoints configuration can be found in api-double.json:

{
  "pathToStubs": "stubs",
  "trackHeaders": ["authorization"], 
  "endpoints": [
    {
      "id": "id1",
      "method": "GET",
      "url": "simple-get",
      "stubs": ["stub1.json"]
    },
    {
      "id": "id2",
      "method": "GET",
      "url": "get/with/params",
      "queryParams": {
        "param1": "value1-exact-match"
      },
      "stubs": ["stub2.json", "stub3.json"]
    },
    {
      "id": "id3",
      "method": "POST",
      "url": "post/url",
      "postBodyParams": {
        "param1": "value1-exact-match",
        "param2": "value2-exact-match"
      },
      "stubs": ["stub4.json"]
    }
  ]
}```