Mockoon release v7.0.0

2024-03-04

Welcome to this new major release of Mockoon. It adds a new exciting feature: support for environment variables. It also includes many bug fixes and improvements. Read on to learn more about this release.


 Our sponsors

GitHub Localazy

Mockoon is an open-source project built by volunteer maintainers. If you like our application, please consider sponsoring us and join all the Sponsors and Backers who helped this project over time!

sponsor button


 ⚠️ Breaking change

We introduced some breaking changes in this major release:

  • macOS 10.13 and 10.14 support has been removed.
  • We disabled the JSONPath array "wrapping" feature.

 Environment variables support

Mockoon now lets you access environment variables in your templates using the getEnvVar helper. This allows you to avoid exposing your API keys and certificates in your mock server configuration:

{{getEnvVar 'MOCKOON_MY_VARIABLE'}}

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

(Issue #849)

 JSONPath change (⚠️ potentially breaking)

We disabled the JSONPath "wrapping" feature causing every result to be wrapped in an array. This feature made it hard to use JSONPath in rules and templates and test for specific cases, like the absence of a property.

In practice, it means that fetching a single property with JSONPath may return undefined or null internally instead of an empty array. This change may require you to update your rules and templates.

(Issue #1297)

 Fixes

  • Data buckets are now generated when referenced only from a callback body. (Issue #1302)
  • Nested data buckets are now correctly generated when they are not referenced anywhere else. (Issue #1311)
  • The CLI --port and --hostname flags are now correctly applied when directly running OpenAPI specification files. (Issue #1308)
  • Fixed a bug where Callbacks with headers would cause a crash when running the API mock with the CLI. (Issue #1328)

 Chores (⚠️ breaking)

We updated all the applications and libraries' dependencies to their latest versions. It also fixed some reported vulnerabilities. Updating the desktop application to Electron's latest version also remove support for macOS 10.13 and 10.14.

(Issue #1324)

 Thank you

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