Skip to content

Commit

Permalink
docs: fix responses and add example
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSide authored and DevSide committed Nov 20, 2019
1 parent 3e4efa5 commit 21057d2
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Expand Up @@ -199,7 +199,7 @@ The fixtures are composed of:
"filepath": "{string} [default=``] - Filepath to serve with auto mime-types",
"options": {
"delay": "{number} [default=0] - Delay the response with a number of milliseconds",
"lifetime": "{number} [default=1] - Number of times the fixture can be consumed before getting removed"
"lifetime": "{number} [default=1] - Number of times the fixture can be consumed before getting removed, use 0 for unlimited consumption"
}
},
"responses": "{array} [default=[]] - Array of responses"
Expand Down Expand Up @@ -277,6 +277,23 @@ Examples:
}
```

```json
{
"request": {
"path": "/",
"method": "get"
},
"responses": [
{
"body": "first return"
},
{
"body": "second return"
}
]
}
```

**Responses**

- Status 200 - OK
Expand Down Expand Up @@ -348,10 +365,10 @@ It is meant to setup multiple fixtures at once.
"filepath": "{string} [default=``] - Filepath to serve with auto mime-types",
"options": {
"delay": "{number} [default=0] - Delay the response with a number of milliseconds",
"lifetime": "{number} [default=1] - Number of times the fixture can be consumed before getting removed"
"lifetime": "{number} [default=1] - Number of times the fixture can be consumed before getting removed, use 0 for unlimited consumption"
}
},
"options": {}
"responses": "{array} [default=[]] - Array of responses"
}
]
```
Expand Down

0 comments on commit 21057d2

Please sign in to comment.