Skip to content

Releases: dhuan/mock

v0.8.1

17 Jun 12:02

Choose a tag to compare

Update changelog for 0.8.1

v0.8.0

13 May 08:16

Choose a tag to compare

Release 0.8.0

v0.7.0

16 Apr 16:37

Choose a tag to compare

ADDED

  • Responses with exec:<SHELL COMMAND> is now supported;
  • Endpoints can now be defined through command-line parameters, such as: --route foo/bar --method post --status-code 201 --response "Hello world!";

CHANGED

  • The --config command-line parameter is no longer mandatory since now endpoints can be defined without configuration files;

FIXED

  • Defining responses referenced through files with absolute path fails. (with relative file paths no issues, only absolute);

v0.6.0

05 Mar 13:16

Choose a tag to compare

ADDED

  • Responses can now read environment variables. Previously only shell-script responses had that ability - now any kind of response, either file or static text can achieve the same. Check Reading Environment Variables in the User Guide.
  • New variable added to read current request's host MOCK_REQUEST_HOST.

v0.5.0

04 Mar 14:23

Choose a tag to compare

Breaking changes

  • "Endpoint Parameters" has been renamed to "Route Parameters"

Example - reading a parameter named foo:

Before: MOCK_REQUEST_ENDPOINT_PARAM_FOO

Now: MOCK_ROUTE_PARAM_FOO

Check the User Guide for more details.

Features & enhancements

  • Route Parameters can be captured in the Response string. Before, the parameters could only be read by Shell Scripts Responses. A response can now be set as follows:
{
  "endpoints": [
    {
      "route": "book/{book_name}",
      "method": "GET",
      "response": "file:./books/${book_name}.txt"
    }
  ]
}
  • Static files support, with fs:./path/to/files;
  • Endpoints can be configured without any HTTP Method - it will default to GET;

v0.4.0

21 Feb 01:52

Choose a tag to compare

  • New Request Handler Variable added: MOCK_HOST for retrieving the current host that the Mock server is listening on.
  • Enable JSON Responses to include environment variables, which previously could only be read by Shell Script responses.

Bugs fixed:

  • Trying to assert with "Json Body" on a Request that didn't have any payload would result in 500 Status Code API Error;

v0.3.0

17 Dec 09:37

Choose a tag to compare

  • Endpoint Routes can now contain wildcards or placeholder variables;
  • Shell Script Response Handlers now support params, such as: "response": "sh:./my_shell_script.sh some_param another_param";
  • --delay option added enabling you to simulate slow APIs;

v0.2.0

18 Nov 21:36

Choose a tag to compare

Update changelog

v0.1.4

01 Nov 19:46

Choose a tag to compare

Update CHANGELOG

v0.1.3

10 Oct 19:18

Choose a tag to compare

Update changelog