Skip to content

Commit

Permalink
Merge pull request #61 from smollweide/develop
Browse files Browse the repository at this point in the history
v0.17.4
  • Loading branch information
smollweide authored Aug 10, 2017
2 parents 5922539 + 6168972 commit c52adcf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/controller/MockController.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ MockController.prototype = extend(MockController.prototype, {
*/
_sendError: function (options) {
var status;
var reg = (/(error)(-)([0-9]{3})/).exec(options.expectedResponse);
var reg = (/(error)(-)([0-9]{3})/).exec(options.expectedResponse.name);

if (reg === null) {
status = 500;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-mock-server",
"version": "0.17.3",
"version": "0.17.4",
"description": "File based Node REST API mock server",
"email": "[email protected]",
"author": "Simon Mollweide <[email protected]>",
Expand Down
39 changes: 20 additions & 19 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,6 @@

![node-mock-server-ui.png](https://cloud.githubusercontent.com/assets/2912007/26034363/c509d2c2-38bb-11e7-9175-4a151f7a550f.jpg)

## Features
- Node.js and file based ([folder structure](/doc/readme-folder-structure.md))
- [Node Mock Server UI](/doc/readme-ui-documentation.md)
- [Functions in mock data](/doc/readme-mock-functions.md)
- [Faker included](/doc/readme-faker.md)
- [Query params in mock data](/doc/readme-query-params.md)
- [Dynamic path params in mock data](/doc/readme-path-params.md)
- [Expected responses](/doc/readme-expected-response.md)
- [Middleware responses](/doc/readme-middleware.md)
- [Express Middleware](/doc/readme-express-middleware.md)
- [Error cases](/doc/readme-expected-response.md)
- [Swagger import](/doc/readme-swagger-import.md)
- DTO import
- DTO response function
- [Response validation](/doc/readme-response-validation.md)
- [Response header](/doc/readme-response-header.md)
- [DTO to Class converter](/doc/readme-dto-2-class.md)
- [Collections](/doc/readme-collections.md)

## Getting Started
This application requires Node `4` or higher.
For Node `<4` please use `[email protected]`
Expand All @@ -50,6 +31,26 @@ $ node node_modules/node-mock-server/init
### Usage examples
[node-mock-server usage examples](/doc/readme-usage-examples.md)


## Features
- Node.js and file based ([folder structure](/doc/readme-folder-structure.md))
- [Node Mock Server UI](/doc/readme-ui-documentation.md)
- [Functions in mock data](/doc/readme-mock-functions.md)
- [Faker included](/doc/readme-faker.md)
- [Query params in mock data](/doc/readme-query-params.md)
- [Dynamic path params in mock data](/doc/readme-path-params.md)
- [Expected responses](/doc/readme-expected-response.md)
- [Middleware responses](/doc/readme-middleware.md)
- [Express Middleware](/doc/readme-express-middleware.md)
- [Error cases](/doc/readme-expected-response.md)
- [Swagger import](/doc/readme-swagger-import.md)
- DTO import
- DTO response function
- [Response validation](/doc/readme-response-validation.md)
- [Response header](/doc/readme-response-header.md)
- [DTO to Class converter](/doc/readme-dto-2-class.md)
- [Collections](/doc/readme-collections.md)

## CLI
```
$ node <nodeScript> --help
Expand Down

0 comments on commit c52adcf

Please sign in to comment.