github mockoon/mockoon v1.14.0

latest releases: v8.1.1, libs-v8.1.1, v8.1.0...
2 years ago

Welcome to this new release of Mockoon. There are several bug fixes and new features in this version that we hope you will like. But first some news:

  • With this release, we decided to take the CLI out of beta 🎉. There is still space for improvements, but it looks stable enough. One breaking change though: Node.js v10 is not supported anymore.

  • More users are joining Mockoon's community every day, spreading the word, contributing to the codebase, and giving us invaluable feedback. We are grateful for this. ❤ While we dedicate more and more time to this project, we are looking for sponsors to help us pursue this great endeavor.

  • We are interested to learn about specific use cases you or your company encountered. It could even become an article, like Impala's API UX research process we recently published. Contact us!

And now the changelog:

Features:

Custom status codes (Issue #199)

We added some missing status codes to the dropdown, but more importantly, you can now enter custom status codes. Even very invalid ones like 999.

demo

Sequential responses (Issue #459)

A new option is now available to serve different responses sequentially.
In the below example, Mockoon will answer with 200 → 404 → 500 → 200 → 404... and so on. The sequence gets reset after restarting the server.

image

Head over to the sequential responses documentation to learn more about this feature.

Request number response rule (Issue #459)

A new type of rule, "Request number", is now available. It allows you to serve a specific response depending on the index (number) of the entering requests. As for the sequential responses feature, it gets reset when restarting the server.

This example returns a 500 error only for the first call:

image

While this one returns a 500 error for the first 9 calls:

image

Head over to the response rules documentation to learn more about this feature.

Misc

  • A new baseUrl helper has been added which returns the request's base URL (without the route path): {protocol}://{hostname}:{port}/{prefix}. (Issue mockoon/commons-server#7)

  • A new option has been added to prevent forwarding of the API prefix when the proxy mode is enabled. (Issue #237)

    do-not-forward-prefix

Improvements:

  • To improve the application stability, only one instance can run at a single time. Running a second instance of the application will focus the running instance if any. (Issue #455)

  • Multiple headers with the same name are now supported everywhere (route headers, environment headers, proxy request/response headers). This may be a non-standard way of sending the headers (vs comma-separated values) but a common one, especially for the Set-Cookie header. (Issue #318)

  • We added more suggestions to the header names and values dropdowns to help you mock faster!

  • Thanks to work on issue #199, we improved the look and feel of the HTTP methods dropdown with improved hype (and more accessible) pastel colors.

    demo2

  • "Port is invalid" message has been updated to "Port is invalid or access is denied" to give more hints about the potentially reserved ports on Windows. (Issue #463)

Fixes:

  • We updated the Faker.js library to its latest version. This indirectly solved the issue with 'internet.avatar' URLs returning a 403. (Issue mockoon/commons-server#1)
  • Having a response with empty rules but an AND operator does not interrupt the rules evaluation and does not serve the wrong response anymore. (Issue mockoon/commons-server#6)
  • Route path and prefix duplicated slashes are now correctly deduplicated when running the server. (Issue mockoon/commons-server#9)

Thank you

A big thank you to the following people that helped to make Mockoon better:

Don't miss a new mockoon release

NewReleases is sending notifications on new releases.