connect-api-mocker

Connect middleware that creates mocks for REST APIs

APACHE-2.0 License

Downloads
31.8K
Stars
272
Committers
19

Bot releases are visible (Hide)

connect-api-mocker - v1.11.0 Latest Release

Published by github-actions[bot] 7 months ago

1.11.0 (2024-03-20)

Features

  • cjs support in custom middleware file names (#80) (65c1513)
connect-api-mocker - v1.10.0

Published by muratcorlu over 3 years ago

1.10.0 (2021-06-04)

Features

  • json helper now also accepts callback (3b07b0f)
connect-api-mocker - v1.9.0

Published by muratcorlu over 4 years ago

1.9.0 (2020-04-25)

Features

  • file helper also sets Content-Length response header (09b7e33)
connect-api-mocker - v1.8.0

Published by muratcorlu over 4 years ago

1.8.0 (2020-04-25)

Features

  • type and file helpers added. (e737d9c)
connect-api-mocker - v1.7.0

Published by muratcorlu about 5 years ago

1.7.0 (2019-09-26)

Features

  • Making body parser optional and configurable. (9d14f87)
  • making body-parser optional and configurable. (fd61145)
connect-api-mocker - v1.6.0

Published by muratcorlu about 5 years ago

1.6.0 (2019-08-08)

Features

  • BodyParser settings are now configurable (bc5ca52)
connect-api-mocker - v1.5.1

Published by muratcorlu about 5 years ago

1.5.1 (2019-08-08)

Bug Fixes

  • Handlebars dependency upgraded for security (f45222e)
connect-api-mocker - v1.5.0

Published by muratcorlu over 5 years ago

1.5.0 (2019-04-16)

Features

  • Helper functions for custom responses (ba5831f)
  • Helper functions for custom responses - Fixes #32 (cdb3ebd)
connect-api-mocker - 1.4.0

Published by muratcorlu about 6 years ago

1.4.0 (2018-09-27)

Features:

  • Now you can define mock files for catching all methods once. You can just use names ANY.json or ANY.js. (Thanks to @daanoz)
  • Matching with nested wildcard improved. #25
connect-api-mocker - 1.3.6

Published by muratcorlu over 6 years ago

Features:

  • Verbose mode added. (Thanks to @iakovmarkov)
connect-api-mocker - 1.3.5

Published by muratcorlu almost 7 years ago

Features:

  • Body Parser added as a internal dependency. So if you can read json body from request objects without any hassle.
connect-api-mocker - 1.3.4

Published by muratcorlu about 7 years ago

Features:

  • Custom middlewares will not cached anymore. So you don't need to restart your server when you changed your custom middlewares.
connect-api-mocker - 1.3.3

Published by muratcorlu about 7 years ago

Features:

  • XML Support added with the type config parameter (Fixes #11)
connect-api-mocker - 1.3.2

Published by muratcorlu about 7 years ago

Improvements:

  • Base url may be root path now.
connect-api-mocker - 1.3.1

Published by muratcorlu about 7 years ago

1.3.1 (2017-08-03)

Fixes:

  • Checking for wildcard folders fail when no mocks folder exits
connect-api-mocker - 1.3.0

Published by muratcorlu about 7 years ago

Breaking Changes:

  • speedLimit feature removed
  • Setting multiple routes at once feature removed

Features:

  • baseUrl can be set in outside of api mocker. For example, these are valid usage examples:
app.use('/api', apiMocker('target/path'));

// or
app.use('/api/v[1-9]{1,2}/', apiMoker({
    target: 'target/path',
    nextOnNotFound: true
}));
  • Wildcards in paths #6
connect-api-mocker - 1.2.3

Published by muratcorlu over 7 years ago

Fixes:

  • Target path doesn't ignore leading slash