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.
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!
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)
Mockoon now supports global variables that can be set and accessed using the setGlobalVar
and getGlobalVar
helpers at runtime.
Copy
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.
server.url
is now correctly parsed when it only contains a path (no protocol or domain). (Issue #1221).yml
extensions are now selectable in the OpenAPI import dialog. (Issue #1229)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:
Copyconst mockoonServerless = new mockoon.MockoonServerless(mockEnv, { fakerOptions: { locale: 'en_GB', seed: 1234 } });
More information in the Serverless package's documentation
(Issue #669)
A big thank you to the following people who helped to make Mockoon better: