Mockoon release v6.1.0

2023-12-29

Welcome to this new release of Mockoon, the last of 2023!
It brings two new exciting features: CRUD filtering and searching, and global variables. Read on to learn more about this release.


 Our platinum 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


 CRUD filtering and searching

This new feature adds search and filter options to the main GET endpoint of a CRUD route, using query parameters. Many operators are available to filter your data like _eq,_gt,_lte, or _start. They can filter on any property of the data, including nested properties using the dot notation:

/users?name_eq=John&age_gt=18&address.city_start=New

You can also use the search parameter to search for a string in all properties of the data:

/users?search=john

Read more about this feature in the documentation.

(Issue #1047)

 Global variables

Mockoon now supports global variables that can be set and accessed using the setGlobalVar and getGlobalVar helpers at runtime.

Copy
{{setGlobalVar 'myVar' 'myValue'}} {{getGlobalVar 'myVar'}}

These variables can be used anywhere templating is supported, like the response body or headers. Their values are reset when the environment is stopped or restarted.

Read more about this feature in the documentation.

 OpenAPI import improvements

  • The OpenAPI v3 specification server.url is now correctly parsed when it only contains a path (no protocol or domain). (Issue #1221)
  • The CLI is now correctly reporting the OpenAPI import errors alongside Mockoon's format parser errors. (Issue #1229)
  • Files with .yml extensions are now selectable in the OpenAPI import dialog. (Issue #1229)

 CLI and Serverless new Faker.js options

New flags were added to the CLI, and new options to the Serverless package, to allow setting the Faker.js locale and seed.

For the CLI, use the --faker-locale and --faker-seed flags. More information in the CLI's documentation.

For the Serverless package, use the fakerOptions.locale and fakerOptions.seed options:

Copy
const mockoonServerless = new mockoon.MockoonServerless(mockEnv, { fakerOptions: { locale: 'en_GB', seed: 1234 } });

More information in the Serverless package's documentation

(Issue #669)

 Desktop application

  • Fix the data bucket name not being displayed on a CRUD route view when creating from the template modal. (Issue #1234)
  • Fix the Faker.js locale not being applied from the settings on startup. (Issue #1222)
  • Fix callbacks not being removed from the route response's callbacks view when deleted, in the case multiple responses were present. (Issue #1215)

 Thank you

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