Skip to content

Commit 6bb976f

Browse files
committed
Release 9.4.0 docs and changelog
- Update admin API events endpoint docs (See mockoon/mockoon#1807) - Add plural req helpers docs (see mockoon/mockoon#1827) - Add proxy decompression docs (see mockoon/mockoon#1577) - Update cloud docs - Add 9.4.0 changelog
1 parent b01cc9c commit 6bb976f

File tree

157 files changed

+5406
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+5406
-12
lines changed

components/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const Footer: FunctionComponent<{
151151
</li>
152152
<li className='mb-2'>
153153
{/* Do not use <Link>, as routes with a dot inside get rewritten without trailing slash */}
154-
<a href='/releases/9.3.0/' className='text-reset'>
154+
<a href='/releases/9.4.0/' className='text-reset'>
155155
Releases
156156
</a>
157157
</li>

components/nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const Nav: FunctionComponent<{
381381
Blog
382382
</Link>
383383
<a
384-
href='/releases/9.3.0/'
384+
href='/releases/9.4.0/'
385385
className={`dropdown-item ${
386386
router.pathname === '/releases' ||
387387
router.pathname === '/releases/[version]'

content/blog/introducing-new-issue-label-system-enhanced-transparency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For a long time, we believed that **every issue deserved a chance to stay open**
2727

2828
We've designed a detailed labeling system that makes it **immediately clear where every issue stands**.
2929

30-
![screenshot of the new labels design](/images/blog/introducing-new-issue-label-system-enhanced-transparency/new-labels-preview.png)
30+
![screenshot of the new labels design{617x232}](/images/blog/introducing-new-issue-label-system-enhanced-transparency/new-labels-preview.png)
3131

3232
Our new labels are organized into several categories:
3333

content/cloud-docs/api-mock-cloud-deployments.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,29 @@ In the management dialog, you can **re-deploy** the environment or **delete** th
4040

4141
![deployment management dialog re-deploy or delete the instance menu{886x210}](cloud-docs-img:deploy-environment-management-menu.png)
4242

43+
### Desktop/web apps and re-deployments
44+
45+
Currently, the behavior of re-deployments is different depending on whether you are using the desktop application or the web application:
46+
47+
- **Desktop application**: For historical reasons, the desktop application is still biased towards local development. Therefore, all changes made to cloud environments will only be applied to the cloud instances when you re-deploy them manually. This allows you to make changes to your environment without affecting the running instance until you are ready to update it.
48+
- **Web application**: In the web application, many changes are pushed to the cloud instance automatically without requiring a manual re-deployment. This is because the web application is designed to be more collaborative and real-time, allowing you to see the changes reflected in the running instance immediately. However, some changes may still require a manual re-deployment, depending on their nature.
49+
50+
The following changes are **applied automatically**:
51+
52+
- Some environment properties (headers, proxy headers, latency, etc.).
53+
- Some route properties (response mode).
54+
- Adding and removing callbacks.
55+
- Route responses (headers, latency, status code, callbacks calls, rules, etc.).
56+
57+
The following changes still **require a manual re-deployment**:
58+
59+
- Route paths and methods.
60+
- Adding or removing routes.
61+
- Environment port, hostname, proxy and TLS options.
62+
- Adding or removing data buckets.
63+
64+
We plan to unify this behavior in future versions of Mockoon to provide a consistent experience across both applications.
65+
4366
## Instance URL and visibility
4467

4568
The instance will be deployed on a shared cloud infrastructure and will be accessible using a unique URL in the form of `https://mock-abcd1234.{serverId}.mockoon.app`. The URL will be displayed in the management dialog and can be shared with your team, clients, or class. You can also customize the subdomain part of the URL when deploying the environment.

content/cloud-docs/data-synchronization-team-collaboration.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ These quotas and limits are subject to change. Please refer to your [account set
116116
Here is a list of limitations of the current version of the data synchronization feature:
117117

118118
- External files linked to the environment are not synchronized (e.g. environment's certificates or files used in the "File" response body type).
119-
- The CLI and serverless package do not support access to cloud environments yet.
120-
- Team and Enterprise plans are currently not offering a personal cloud space for each user. All environments are shared across the team.
119+
- The CLI package cannot deploy cloud environments yet ([but it's on our roadmap](https://github.com/mockoon/mockoon/issues/1736)).

content/cloud-docs/web-application.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ The interface is the same as the desktop application, with a few differences due
2727
- [Cloud deployments unsupported features](cloud-docs:api-mock-cloud-deployments#unsupported-features) (file serving, custom TLS, etc.) are hidden to avoid confusion.
2828
- Desktop/local specific options and features are disabled or hidden (managing local environments, etc.).
2929
- Some interface elements were modified to fit the web application (e.g. the server start button deploys to the cloud instead of starting a local server).
30+
- The web application handles re-deployments differently than the desktop application (see [Desktop/web apps and re-deployments](cloud-docs:api-mock-cloud-deployments#desktopweb-apps-and-re-deployments) for more information).
3031

3132
As this application is still in early access, we are working on improving the interface and adding new features. We welcome your feedback and suggestions to help us make it better.
3233

33-
Also, some features are not yet available in the web application but will be added in future versions:
34-
35-
- OpenAPI import/export.
36-
- JSON import/export.
37-
3834
## Web app version and migration
3935

4036
The web application is always running the latest version of Mockoon. You don't need to worry about updating it, as it will always be up to date with the latest features and improvements.

content/docs/latest/admin-api/events.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ To subscribe to the events, call the following endpoint:
2020

2121
- **Method:** `GET`
2222
- **URL:** `/mockoon-admin/events`
23+
- **Parameters:**
24+
- `maxlogs` (optional): The maximum number of logs to retrieve upon connection. If not specified, all logs will be sent, limited by the server's configuration.
2325

2426
**Example request:**
2527

2628
```http
27-
GET /mockoon-admin/events
29+
GET /mockoon-admin/events?maxlogs=100
2830
```
2931

3032
## Events
@@ -77,6 +79,8 @@ Example of a log event:
7779

7880
The data in the `transaction` property is following the [Transaction model](https://github.com/mockoon/mockoon/blob/main/packages/commons/src/models/server.model.ts#L61-L86) similar to the one used in the [`/mockoon-admin/logs` endpoint](docs:admin-api/transaction-logs).
7981

82+
Upon connection, the server will send the last `maxlogs` transactions (if specified) and then continue to send new transactions as they are completed.
83+
8084
### Data buckets processed event
8185

8286
This event is triggered when the data buckets are processed during the server launch. It contains details about the statuses of the data buckets in a `dataBuckets` property:

content/docs/latest/server-configuration/proxy-mode.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ Proxy specific headers can also be added, both to the forwarded request and the
3737
![add proxy headers by filling the keys and values{1484x375}](docs-img:proxy-headers.png)
3838

3939
> **Proxy request headers** will be automatically added to the request sent to the proxied server, while **proxy response headers** are added to the response received from the proxied server.
40+
41+
## Decompression of proxied response bodies
42+
43+
If the response body is compressed (e.g., with gzip, deflate, brotli or Zstandard) and the `Content-Encoding` header is set accordingly, Mockoon will automatically decompress the body before returning it to the client. The response body will be shown uncompressed in the Mockoon [Logs view](docs:logging-and-recording/requests-logging) and in the [Admin API `/logs` endpoint](docs:admin-api/transaction-logs).
44+
45+
> ⚠️ Zstandard decompression support is available in the desktop application and cloud, but the availability in the CLI and libraries depends on the Node.js version used by your system and requires Node.js v22 or later.

content/docs/latest/templating/mockoon-request-helpers.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ Mockoon offers the following helpers which can return information relative to th
1616
- [`bodyRaw`](#bodyraw)
1717
- [`queryParam`](#queryparam)
1818
- [`queryParamRaw`](#queryparamraw)
19+
- [`queryParams`](#queryparams)
1920
- [`urlParam`](#urlparam)
21+
- [`urlParams`](#urlparams)
2022
- [`cookie`](#cookie)
2123
- [`header`](#header)
24+
- [`headers`](#headers)
2225
- [`hostname`](#hostname)
2326
- [`ip`](#ip)
2427
- [`method`](#method)
@@ -204,6 +207,28 @@ Get the **raw** value at a given `path` from the request's query string. Complex
204207
{{/if}}
205208
```
206209

210+
## queryParams
211+
212+
Returns an object containing all query parameters from the request URL. This helper is useful for iterating over all query parameters.
213+
214+
**Examples**
215+
216+
```handlebars
217+
<!-- Iterate over all query parameters -->
218+
{{#each (queryParams)}}
219+
{{@key}}:{{this}}
220+
{{/each}}
221+
222+
<!-- Get all query parameters as JSON -->
223+
{{{stringify (queryParams)}}}
224+
225+
<!-- Check if a specific query parameter exists -->
226+
{{#if (lookup (queryParams) 'page')}}
227+
Page parameter provided:
228+
{{lookup (queryParams) 'page'}}
229+
{{/if}}
230+
```
231+
207232
## urlParam
208233

209234
Get a named parameter from the route `/:paramName1/:paramName2`.
@@ -218,6 +243,28 @@ Get a named parameter from the route `/:paramName1/:paramName2`.
218243
{{urlParam 'paramName1'}}
219244
```
220245

246+
## urlParams
247+
248+
Returns an object containing all URL parameters from the route. This helper is useful for iterating over all URL parameters.
249+
250+
**Examples**
251+
252+
```handlebars
253+
<!-- Iterate over all URL parameters -->
254+
{{#each (urlParams)}}
255+
{{@key}}:{{this}}
256+
{{/each}}
257+
258+
<!-- Get all URL parameters as JSON -->
259+
{{{stringify (urlParams)}}}
260+
261+
<!-- Check if a specific URL parameter exists -->
262+
{{#if (lookup (urlParams) 'userId')}}
263+
User ID provided:
264+
{{lookup (urlParams) 'userId'}}
265+
{{/if}}
266+
```
267+
221268
## cookie
222269

223270
Get the content of a cookie or returns a default value if the cookie is not present.
@@ -248,6 +295,27 @@ Get content from any request header or returns a default value if header is not
248295
{{header 'Header-Name' 'default value'}}
249296
```
250297

298+
## headers
299+
300+
Returns an object containing all request headers. This helper is useful for iterating over all headers.
301+
302+
**Examples**
303+
304+
```handlebars
305+
<!-- Iterate over all headers -->
306+
{{#each (headers)}}
307+
{{@key}}:{{this}}
308+
{{/each}}
309+
310+
<!-- Get all headers as JSON -->
311+
{{{stringify (headers)}}}
312+
313+
<!-- Check if a specific header exists -->
314+
{{#if (lookup (headers) 'authorization')}}
315+
Authorization header provided
316+
{{/if}}
317+
```
318+
251319
## hostname
252320

253321
Returns the request hostname.

content/docs/v9.3.0/about.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: About the documentation
3+
meta:
4+
title: Learn about Mockoon's documentation
5+
description: Discover Mockoon's features and options, explore advanced topics and learn how to create fast and free mock API JSON servers.
6+
order: 10
7+
---
8+
9+
# About the documentation
10+
11+
---
12+
13+
This documentation covers Mockoon's most used features and options to help you create the best mock APIs. These topics apply to the [desktop application](/download/), [CLI](/cli/), and [serverless package](/serverless/) which supports the same features.
14+
15+
You will find a documentation for the most recent releases of Mockoon. Head over to our [releases section](/releases/) for more details about the changes in each version.
16+
17+
If you find a mistake in the documentation, you can open an issue on the [website's repository](https://github.com/mockoon/mockoon.com).
18+
19+
## CLI-specific documentation (flags, etc.)
20+
21+
You will find the [CLI documentation](https://github.com/mockoon/mockoon/blob/main/packages/cli/README.md) in its dedicated readme file on the repository. It covers the CLI's specific features, like the available flags or how to use the Docker file.
22+
23+
## Serverless-specific documentation (options, etc.)
24+
25+
You will find the [serverless package documentation](https://github.com/mockoon/mockoon/blob/main/packages/serverless/README.md) in its dedicated readme file on the repository. It covers the package usage instructions and specific features.
26+
27+
## Web application
28+
29+
The [web application](cloud-docs:web-application) is a web version of the desktop application available for Mockoon Cloud customers. While based on the same codebase, it is not a direct replacement for the desktop application and does not support all the features. Please refer to the [web application documentation](cloud-docs:web-application#ui-differences) for more information about the differences.
30+
31+
## Versioning
32+
33+
Even if Mockoon is primarily a desktop application, we are following [semantic versioning](https://semver.org/). All the applications and packages **share the same version number** for each release.
34+
35+
This allows you to migrate from one version to another without worrying about compatibility issues between the desktop application and the CLI or serverless package.
36+
37+
### Major versions
38+
39+
While the desktop application can easily **migrate from one version to another** (including major versions), this is not the case for the CLI or serverless package. When you are using one of your [data files](docs:mockoon-data-files/data-files-location) with the CLI or serverless package, or sharing it with your team, you need to make sure that the data file schema is compatible with the version you or your team is using.
40+
41+
Every time we introduce a **breaking change** in the data file schema (e.g. new feature) we release a **new major version**. We recommend that you always migrate simultaneously to the same major version for all the desktop applications and packages you are using.
42+
43+
> 📝 Note to our Cloud users: the same recommendation applies when you are using our **Cloud features**. Please have a look at the [team collaboration](cloud-docs:data-synchronization-team-collaboration#major-versions-migrations) and [cloud deployments](cloud-docs:api-mock-cloud-deployments#major-versions-migrations) documentations for more information.
44+
45+
### Breaking changes
46+
47+
When building libraries, the definition of a **breaking change** is usually straightforward. However, when building desktop applications, it's harder to define what a breaking change is.
48+
49+
Also, as we have **multiple components** (desktop application, CLI, serverless package), we have to consider the impact of a change on all these components while avoiding a too-strict definition of a breaking change that would mandate a new major version for every release.
50+
51+
Our definition of a breaking change is a change impacting the [**data schema**](docs:mockoon-data-files/data-files-location) and creating a **compatibility issue** between the applications and packages.
52+
53+
Examples of **schema changes** that would require a **new major version**:
54+
55+
- Adding a new feature requiring a new field.
56+
- Adding a new type in an enum field, like a new rule type.
57+
- Removing a feature that requires removing a field from the schema.
58+
59+
The consequence of such a change is that the data file created with a recent version of the desktop application would not be compatible with an older version of the desktop application, CLI, serverless package, or a team Cloud workspace.
60+
61+
What we do **not consider a breaking change**, even if it might impact the user experience and require a migration effort:
62+
63+
- Changing the UI layout.
64+
- Changing the behavior of a feature (e.g. adding templating support to a field).
65+
- Changing the templating helpers' signatures or adding new ones.

0 commit comments

Comments
 (0)