2024-12-05
Welcome to this new release of Mockoon. It brings many improvements among which data buckets state reporting, custom subdomains for cloud deployments, new --proxy
CLI flag, JSON Schema formats support, and many more improvements and fixes.
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!
You can also support us by subscribing to our Cloud and enjoy a whole new level of capabilities: real-time collaboration, cloud deployments, AI-powered API mocks generation, enterprise-grade support, and more to come!
Your contribution fuels Mockoon’s independence and keeps the project alive!
Because it can be difficult to know if your data buckets are generating valid JSON data, we added a new indicator in the UI to show you if they were generated and if the result was valid JSON:
You can also click on the indicator to see the generated data in an editor and the validation error, if any (read-only):
(Issue #1581)
We added two new options to configure your mock deployments in the cloud: you can now customize the subdomain of your cloud deployment (e.g. my-subdomain.mockoon.app
) and disable the admin API for your mock.
--proxy
CLI flag and disabled routes wildcard supportWe added a new --proxy
flag to the CLI to allow you to override the proxy setting of your mock. This flag can either be set to 'enabled' or 'disabled'. This is useful when you want to start a mock with a different proxy setting than the one saved in the configuration file.
mockoon-cli start -d ./mock.json --proxy enabled
We also update the disabled routes flag and Serverless options behavior. You can now disable all routes at runtime by using a wildcard:
With the CLI:
mockoon-cli start -d ./mock.json --disable-routes=*
With the Serverless package:
Copyconst mockoonServerless = new mockoon.MockoonServerless(mockEnv, { disabledRoutes: ['*'] });
(Issue #1024)
The request's path rule will now compare the value against both the original and actual paths, for example, /users/:id
and /users/123
. It is now easier to override CRUD route operations.
(Issue #1605)
We added support for JSON Schema formats. You can now use the format
keyword in your JSON Schema to validate your request bodies.
Copy{ "type": "object", "properties": { "email": { "type": "string", "format": "email" } } }
(Issue #1594)
We also fixed a bug that prevented JSON schema from being compared against the root-level request body. ⚠️ This change may break some rules create without a path. (Issue #1595)
We published a new tutorial on how to use JSON Schema formats in Mockoon. Check it out.
We added a new objectMerge
templating helper to merge two or more objects. We also added a new merge
operator to the setData
helper and made concat
compatible with arrays.
These changes should make object manipulation and merging easier in your templates.
(Issue #1620)
./folder/{{queryParam 'file\.name'}}.json
). (Issue #1623)zipcode
templating helper was detected as a request helper and was delaying data bucket initialization. This is now fixed. (Issue #1589)$[?(@.status==='enabled' && (@.id===1 || @.id===2))]
. (Issue #1583){{faker 'internet.jwt'}}
. (Issue #740)jwt
, etc.) (see Faker.js release notes).