Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
ad83e73
upgrade go version to 1.25.5
marle3003 Dec 13, 2025
ab53eab
fix Unsupported TypeScript syntax
marle3003 Dec 13, 2025
518e982
Merge remote-tracking branch 'refs/remotes/origin/main' into develop
marle3003 Dec 15, 2025
ff2d424
fix security alert #51
marle3003 Dec 15, 2025
fec31c8
Merge remote-tracking branch 'origin/main' into develop
marle3003 Dec 17, 2025
1b6ab59
Bump vite from 7.2.7 to 7.3.0 in /webui
dependabot[bot] Dec 19, 2025
7f4dd98
Bump github.com/evanw/esbuild from 0.27.1 to 0.27.2
dependabot[bot] Dec 19, 2025
568551f
Merge pull request #785 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 19, 2025
da4d083
Bump eslint from 9.39.1 to 9.39.2 in /webui
dependabot[bot] Dec 19, 2025
310877d
Merge pull request #787 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 19, 2025
d49382a
Bump @vitejs/plugin-vue from 6.0.2 to 6.0.3 in /webui
dependabot[bot] Dec 19, 2025
c17d2c6
Merge pull request #789 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 19, 2025
7287d27
Bump vue from 3.5.25 to 3.5.26 in /webui
dependabot[bot] Dec 19, 2025
3bdf7da
Merge pull request #790 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 19, 2025
4af9d95
Bump @types/node from 25.0.1 to 25.0.3 in /webui
dependabot[bot] Dec 19, 2025
14d3d16
Merge pull request #788 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 19, 2025
66b01fe
Merge branch 'develop' into dependabot/go_modules/develop/github.com/…
marle3003 Dec 21, 2025
0c21cb1
Merge pull request #786 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Dec 21, 2025
b870298
Bump github.com/blevesearch/bleve/v2 from 2.5.6 to 2.5.7
dependabot[bot] Dec 21, 2025
4cb264d
Merge pull request #784 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Dec 21, 2025
1e0a7a0
improve Dashboard (WIP)
marle3003 Dec 24, 2025
a6eed0d
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Dec 24, 2025
e606a92
update package-lock.json
marle3003 Dec 24, 2025
28ac452
add Demo Dashboard to website (WIP)
marle3003 Dec 24, 2025
120233a
add Demo Dashboard to website (WIP)
marle3003 Dec 24, 2025
9e97a9c
add new test project
marle3003 Dec 24, 2025
f464f65
fix run only e2e dashboard project
marle3003 Dec 24, 2025
c28232e
fix typo
marle3003 Dec 24, 2025
aba1c5e
fix webui build modes
marle3003 Dec 24, 2025
2f00828
add build step for demo dashboard
marle3003 Dec 24, 2025
4d38670
fix mode used in playwright
marle3003 Dec 24, 2025
ff3ab4e
add debug output
marle3003 Dec 24, 2025
7752874
fix build dashboard
marle3003 Dec 24, 2025
07b6eab
fix path
marle3003 Dec 24, 2025
4e0c915
fix ts run
marle3003 Dec 24, 2025
fb12472
fix ts run
marle3003 Dec 24, 2025
c314e72
fix ts run
marle3003 Dec 24, 2025
7c599dc
update node version
marle3003 Dec 24, 2025
04566f5
add missing image
marle3003 Dec 24, 2025
761de34
fix SMTP server closing connection if StartTlS is used
marle3003 Dec 25, 2025
a6278d5
add analysis for hanging script
marle3003 Dec 25, 2025
a775603
add smtp close
marle3003 Dec 25, 2025
a9a1c1b
fix use dashboard to get appinfo
marle3003 Dec 25, 2025
fceac7c
add header to dashboard demo
marle3003 Dec 25, 2025
12c468e
fix app info request in dashboard view
marle3003 Dec 25, 2025
780d44c
fix app info request in dashboard view
marle3003 Dec 25, 2025
b6fb9d4
fix app info request in dashboard view
marle3003 Dec 25, 2025
0c2127e
Bump ldapts from 8.0.33 to 8.0.35 in /webui
dependabot[bot] Dec 26, 2025
248bc27
Merge pull request #793 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 26, 2025
c45ee8c
Bump vue-tsc from 3.1.8 to 3.2.1 in /webui
dependabot[bot] Dec 26, 2025
9fbdbac
Merge pull request #794 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Dec 26, 2025
cb769de
fix sending mail
marle3003 Dec 26, 2025
071ff6e
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Dec 26, 2025
87cf683
fix build errors
marle3003 Dec 26, 2025
629a393
add color highlight for ldif
marle3003 Dec 26, 2025
7aeab37
add missing file
marle3003 Dec 26, 2025
3b1a972
add dashboard-demo
marle3003 Dec 26, 2025
48ffd4b
remove dashboard-demo
marle3003 Dec 26, 2025
39eb302
add anchor link to the table
marle3003 Dec 27, 2025
78bcab5
improve dashboard links in tables
marle3003 Dec 27, 2025
f7e79a8
fix ssg encoded file path
marle3003 Dec 27, 2025
d704609
add kafka messages to clusters view in dashboard
marle3003 Dec 27, 2025
1a2bf3f
improve selector
marle3003 Dec 28, 2025
f0e7bf1
remove messages on Kafka cluster view
marle3003 Dec 28, 2025
fccfd5a
improve KafkaMessage performance
marle3003 Dec 28, 2025
cfbdc18
fix header style in cards
marle3003 Dec 28, 2025
34fc4c4
disable automatic Apache slash redirects
marle3003 Dec 28, 2025
05f0a3b
fix ldap requests total metric label
marle3003 Dec 28, 2025
14f3b31
fix ldap compare and modifyDn request
marle3003 Dec 28, 2025
02bbd28
add missed files
marle3003 Dec 28, 2025
ec4bad5
add event handler for demo dashboard
marle3003 Dec 29, 2025
e98007d
fix rewrite for search bots
marle3003 Dec 29, 2025
a9f34f2
add LDAP FilterExtensibleMatch support
marle3003 Dec 30, 2025
d0621e7
fix LDAP records for demo dashboard
marle3003 Dec 30, 2025
75b082d
fix route links
marle3003 Dec 30, 2025
7273ea4
improve responsiveness
marle3003 Dec 30, 2025
56639a7
fix test
marle3003 Dec 30, 2025
5ff1889
improve dashboard tabs for responsiveness
marle3003 Dec 30, 2025
3f4b67b
add tabs component
marle3003 Dec 30, 2025
a01dd5d
add memberOf support for LDAP
marle3003 Dec 30, 2025
35dfa7c
add dialog to LDAP search response result to show attributes
marle3003 Dec 30, 2025
670f2b4
fix use DN for memberOf as user defined it
marle3003 Dec 31, 2025
f260cc8
add jobs to demo dashboard
marle3003 Dec 31, 2025
7d99bb1
add jobs to demo dashboard
marle3003 Dec 31, 2025
bbc211c
fix ssg when crawling TypeScript file
marle3003 Dec 31, 2025
56bc66d
add missing petstore file for demo dashboard
marle3003 Dec 31, 2025
79fd422
fix routing
marle3003 Dec 31, 2025
c752121
fix canonical URLs
marle3003 Dec 31, 2025
ec5b69d
Bump ldapts from 8.0.35 to 8.1.2 in /webui
dependabot[bot] Jan 2, 2026
e3a8e10
improve tests for date and time tests
marle3003 Jan 2, 2026
50f3154
improve using context data for data generation
marle3003 Jan 2, 2026
e649f9a
fix XML marshalling to always have one root element
marle3003 Jan 2, 2026
61abd22
fix dashboard UI issues
marle3003 Jan 2, 2026
e44acfd
add more HTTP requests to demo dashboard
marle3003 Jan 2, 2026
751ea78
add sleep
marle3003 Jan 2, 2026
3e7b6b1
add petstore patch file
marle3003 Jan 2, 2026
2f75560
fix config list to be sorted
marle3003 Jan 2, 2026
5d0bfa4
improve line break in table
marle3003 Jan 2, 2026
7eabeef
improve responsiveness
marle3003 Jan 2, 2026
887075b
fix spacing
marle3003 Jan 2, 2026
6628726
add shop promo to header
marle3003 Jan 2, 2026
78f4819
enable promo only on website not on dashboard
marle3003 Jan 2, 2026
ec69207
improve when promo is displayed
marle3003 Jan 2, 2026
5b56240
fix URL
marle3003 Jan 2, 2026
bbeb94c
add a debug message if JavaScript file does not export a default func…
marle3003 Jan 3, 2026
d4b3700
fix Kafka message click bubbling issue in dashboard
marle3003 Jan 3, 2026
1bb3077
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/lda…
marle3003 Jan 3, 2026
6c5d5f9
Merge pull request #795 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/actions/publish-website/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: "Publish website"
description: "Publish website to web hosting"
inputs:
image-name:
required: true
description: Mokapi image name
username:
required: true
description: ftp username
Expand All @@ -18,14 +21,27 @@ runs:
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 23.11.1
registry-url: 'https://registry.npmjs.org'
- id: release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: marle3003/mokapi
excludes: prerelease, draft
token: ${{ inputs.token }}
- name: Run mokapi image
run: docker run --name mokapi --rm -d -p 80:80 -p 8080:8080 -p 9092:9092 -p 8389:8389 -p 8025:8025 --mount type=bind,source=$(pwd)/webui/scripts/dashboard-demo/demo-configs,target=/data --env MOKAPI_Providers_File_Directory=/data ${{ inputs.image-name }}
shell: bash
- name: Build Demo Dashboard
working-directory: ./webui/scripts/dashboard-demo
run: |
npm install
node ci.ts
shell: bash
- name: Stop Mokapi
if: always()
run: docker stop mokapi || true
shell: bash
- name: build website
working-directory: ./webui
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/actions/run-frontend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ runs:
npm ci
npm run copy-docs
npm run build-sitemap
npm run build
npm run build-dashboard
shell: bash
- name: Install Playwright
working-directory: ./webui
run: npx playwright install --with-deps
shell: bash
- name: Run your tests
working-directory: ./webui
run: npx playwright test
run: npx playwright test --project=dashboard
shell: bash
- name: Upload test results
if: always()
Expand All @@ -59,4 +59,8 @@ runs:
uses: actions/upload-artifact@v4
with:
name: mokapi-test-logs
path: /var/tmp/mokapi.log
path: /var/tmp/mokapi.log
- name: Stop Mokapi
if: always()
run: docker stop mokapi || true
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
name: Publish website
runs-on: ubuntu-latest
if: "success()"
needs: [ build-alpha ]
needs: [ setup, build-alpha ]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -84,6 +84,7 @@ jobs:
uses: chetan/git-restore-mtime-action@v2
- uses: ./.github/actions/publish-website
with:
image-name: ${{ needs.setup.outputs.image-name }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
server: ${{ secrets.FTP_SERVER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25.1
go-version: 1.25.5

- name: Check out code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/setup-go@v5
with:
go-version: 1.25.1
go-version: 1.25.5
- uses: actions/setup-node@v4
with:
node-version: 23
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.25.1
go-version: 1.25.5
- uses: actions/setup-node@v4
with:
node-version: 23
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tasks:
- npm run clean
- npm run copy-docs
- npm version {{.VERSION}}
- npm run build
- npm run build-dashboard
build-npm-package:
deps: [build-vue-app]
cmds:
Expand Down
4 changes: 2 additions & 2 deletions api/handler_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type param struct {
Required bool `json:"required"`
Deprecated bool `json:"deprecated"`
Style string `json:"style,omitempty"`
Exploded bool `json:"exploded"`
Explode bool `json:"explode"`
AllowReserved bool `json:"allowReserved"`
Schema *schema.Schema `json:"schema"`
}
Expand Down Expand Up @@ -302,7 +302,7 @@ func getParameters(params openapi.Parameters) (result []param) {
Required: p.Value.Required,
Deprecated: p.Value.Deprecated,
Style: p.Value.Style,
Exploded: p.Value.IsExplode(),
Explode: p.Value.IsExplode(),
AllowReserved: p.Value.AllowReserved,
Schema: p.Value.Schema,
}
Expand Down
2 changes: 1 addition & 1 deletion api/handler_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestHandler_Http(t *testing.T) {
)
},
requestUrl: "http://foo.api/api/services/http/foo",
responseBody: `{"name":"foo","servers":[{"url":"/","description":""}],"paths":[{"path":"/foo/{bar}","operations":[{"method":"get","deprecated":false,"parameters":[{"name":"bar","type":"path","required":true,"deprecated":false,"exploded":false,"allowReserved":false,"schema":{"type":"string"}}]}]}]`,
responseBody: `{"name":"foo","servers":[{"url":"/","description":""}],"paths":[{"path":"/foo/{bar}","operations":[{"method":"get","deprecated":false,"parameters":[{"name":"bar","type":"path","required":true,"deprecated":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}]}]}]`,
},
{
name: "get http service with requestBody",
Expand Down
6 changes: 3 additions & 3 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"component": "examples",
"hideNavigation": true,
"hideInNavigation": true,
"canonical": "https://mokapi.io/docs/resources",
"canonical": "https://mokapi.io/docs/resources/tutorials",
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
},
Expand All @@ -182,7 +182,7 @@
"component": "examples",
"hideNavigation": true,
"hideInNavigation": true,
"canonical": "https://mokapi.io/docs/resources",
"canonical": "https://mokapi.io/docs/resources/examples",
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
},
Expand All @@ -196,7 +196,7 @@
"component": "examples",
"hideNavigation": true,
"hideInNavigation": true,
"canonical": "https://mokapi.io/docs/resources",
"canonical": "https://mokapi.io/docs/resources/blogs",
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
},
Expand Down
11 changes: 6 additions & 5 deletions docs/guides/mail/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,12 @@ folders:

The settings object defines global configuration options that influence server behavior.

| Field Name | Type | Default | Description |
|-------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| maxRecipients | integer | 0 | (Optional) Maximum number of recipients per email. Use 0 for unlimited. |
| autoCreateMailbox | boolean | true | (Optional) Allow create mailboxes at runtime. |
| maxInboxMails | integer | 100 | (Optional) Maximum number of messages kept in the INBOX folder. Oldest mails are removed when the limit is exceeded. Use 0 to disable the limit and store messages indefinitely (not recommended). |
| Field Name | Type | Default | Description |
|-----------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| maxRecipients | integer | 0 | (Optional) Maximum number of recipients per email. Use 0 for unlimited. |
| autoCreateMailbox | boolean | true | (Optional) Allow create mailboxes at runtime. |
| maxInboxMails | integer | 100 | (Optional) Maximum number of messages kept in the INBOX folder. Oldest mails are removed when the limit is exceeded. Use 0 to disable the limit and store messages indefinitely (not recommended). |
| AllowUnknownSenders | boolean | true | (Optional) If true, the server accepts any MAIL FROM: address, even if it’s not listed in the mailboxes: configuration. |

##### Mailbox Object Example

Expand Down
18 changes: 15 additions & 3 deletions docs/javascript-api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ Mokapi supports importing three types of modules:
- **Built-in modules**: Provided by Mokapi for various functionalities.
- **Local filesystem modules**: Custom scripts and Node.js packages.
- **JSON & YAML modules**: Configuration files converted into JavaScript objects.
- **Remote modules**: Hosted on a web server or CDN

``` box=tip
Mokapi monitors all imported modules with `fsnotify`. If a module is modified, any dependent script is automatically reloaded.
Mokapi monitors all imported modules with `fsnotify`. If a module is modified, any dependent script that contains a `default` export is automatically reloaded.
```

## Built-in Modules
Expand All @@ -26,7 +27,7 @@ import { fake } from 'mokapi/faker'

## Local Filesystem Modules

You can import files using relative or absolute paths, and Mokapi supports Node.js modules.
Import files using relative or absolute paths. Node.js resolution rules are supported.

```javascript
import { someFunc } from './helpers.js'
Expand All @@ -36,7 +37,7 @@ import dateTime from 'date-time' // Requires: npm install date-time

## JSON & YAML Modules

Mokapi allows importing JSON and YAML files, automatically converting them into JavaScript objects.
JSON and YAML files can be imported and converted automatically to objects:

```javascript tab=Javascript
import users from './users.json'
Expand All @@ -57,4 +58,15 @@ console.log(envs[0])
- production
```

## Remote Modules

Modules can also be hosted remotely on public web servers, GitHub, or CDNs.

```js
import { helper } from 'https://example.com/mokapi-helpers.js'
```

- Mokapi uses its [HTTP provider](/docs/configuration/dynamic/http.md) to load remote modules
- This allows dynamic updates without restarting Mokapi

By leveraging these module types, you can create flexible, maintainable, and scalable Mokapi scripts.
7 changes: 4 additions & 3 deletions docs/javascript-api/mokapi/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ description: Schedules a new periodic job using cron expression.

Schedules a new periodic job using cron expression.

``` box=info
By default, the first execution happens immediately, check ScheduledEventArgs
```
### Behavior

- By default, **cron jobs wait for the first scheduled tick** before executing.
- To run the job immediately on creation, set `SkipImmediateFirstRun: false` in `args`.

## Parameters

Expand Down
10 changes: 5 additions & 5 deletions docs/javascript-api/mokapi/eventhandler/scheduledeventargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ description: ScheduledEventArgs is an object used by every and cron function.
ScheduledEventArgs is an object used by [every](/docs/javascript-api/mokapi/every.md) and
[cron](/docs/javascript-api/mokapi/cron.md) function.

| Name | Type | Description |
|-----------------------|---------|---------------------------------------------------------------------------------------------------------------------------------|
| times | number | Defines the number of times the scheduled function is executed. |
| skipImmediateFirstRun | boolean | Toggles behavior of first execution. If true job does not start immediately but rather wait until the first scheduled interval. |
| tags | object | Adds or overrides existing tags used in dashboard |
| Name | Type | Default | Description |
|-----------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------|
| times | number | -1 | How many times the job should execute (-1 for unlimited). |
| skipImmediateFirstRun | boolean | | Toggles behavior of first execution. If true job does not start immediately but rather wait until the first scheduled interval. |
| tags | object | {} | Optional tags for identifying the job. |

## Examples

Expand Down
9 changes: 5 additions & 4 deletions docs/javascript-api/mokapi/every.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ Schedules a new periodic job with an interval. Interval string
is a possibly signed sequence of decimal numbers, each with
optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".

``` box=info
By default, the first execution happens immediately, check ScheduledEventArgs
```
### Behavior

- By default, **`every` jobs run immediately**, then repeat according to the interval.
- To skip the immediate run, set `SkipImmediateFirstRun: true` in `args`.

| Parameter | Type | Description |
|-----------------|----------|----------------------------------------------------------------------------------------------------------------------------------|
| interval | string | Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". |
| handler | function | The handler function to be executed every `interval`. By default, the first execution happens immediately. |
| args (optional) | object | [ScheduledEventArgs](/docs/javascript-api/mokapi/eventhandler/scheduledeventargs.md) object contains additional event arguments. |
| args (optional) | object | [ScheduledEventArgs](/docs/javascript-api/mokapi/eventhandler/scheduledeventargs.md) object contains additional event arguments. |

## Example

Expand Down
Loading