Skip to content

Commit cc6389a

Browse files
authored
Merge pull request #796 from marle3003/develop
Develop
2 parents fd989c3 + 6c5d5f9 commit cc6389a

219 files changed

Lines changed: 9455 additions & 2649 deletions

File tree

Some content is hidden

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

.github/actions/publish-website/action.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: "Publish website"
22
description: "Publish website to web hosting"
33
inputs:
4+
image-name:
5+
required: true
6+
description: Mokapi image name
47
username:
58
required: true
69
description: ftp username
@@ -18,14 +21,27 @@ runs:
1821
steps:
1922
- uses: actions/setup-node@v4
2023
with:
21-
node-version: 20
24+
node-version: 23.11.1
2225
registry-url: 'https://registry.npmjs.org'
2326
- id: release
2427
uses: pozetroninc/github-action-get-latest-release@master
2528
with:
2629
repository: marle3003/mokapi
2730
excludes: prerelease, draft
2831
token: ${{ inputs.token }}
32+
- name: Run mokapi image
33+
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 }}
34+
shell: bash
35+
- name: Build Demo Dashboard
36+
working-directory: ./webui/scripts/dashboard-demo
37+
run: |
38+
npm install
39+
node ci.ts
40+
shell: bash
41+
- name: Stop Mokapi
42+
if: always()
43+
run: docker stop mokapi || true
44+
shell: bash
2945
- name: build website
3046
working-directory: ./webui
3147
run: |

.github/actions/run-frontend-tests/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ runs:
3434
npm ci
3535
npm run copy-docs
3636
npm run build-sitemap
37-
npm run build
37+
npm run build-dashboard
3838
shell: bash
3939
- name: Install Playwright
4040
working-directory: ./webui
4141
run: npx playwright install --with-deps
4242
shell: bash
4343
- name: Run your tests
4444
working-directory: ./webui
45-
run: npx playwright test
45+
run: npx playwright test --project=dashboard
4646
shell: bash
4747
- name: Upload test results
4848
if: always()
@@ -59,4 +59,8 @@ runs:
5959
uses: actions/upload-artifact@v4
6060
with:
6161
name: mokapi-test-logs
62-
path: /var/tmp/mokapi.log
62+
path: /var/tmp/mokapi.log
63+
- name: Stop Mokapi
64+
if: always()
65+
run: docker stop mokapi || true
66+
shell: bash

.github/workflows/alpha.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
name: Publish website
7575
runs-on: ubuntu-latest
7676
if: "success()"
77-
needs: [ build-alpha ]
77+
needs: [ setup, build-alpha ]
7878
steps:
7979
- name: Check out code
8080
uses: actions/checkout@v4
@@ -84,6 +84,7 @@ jobs:
8484
uses: chetan/git-restore-mtime-action@v2
8585
- uses: ./.github/actions/publish-website
8686
with:
87+
image-name: ${{ needs.setup.outputs.image-name }}
8788
username: ${{ secrets.FTP_USERNAME }}
8889
password: ${{ secrets.FTP_PASSWORD }}
8990
server: ${{ secrets.FTP_SERVER }}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Set up Go
1313
uses: actions/setup-go@v5
1414
with:
15-
go-version: 1.25.1
15+
go-version: 1.25.5
1616

1717
- name: Check out code
1818
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
password: ${{ secrets.DOCKER_PASSWORD }}
2727
- uses: actions/setup-go@v5
2828
with:
29-
go-version: 1.25.1
29+
go-version: 1.25.5
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 23
@@ -59,7 +59,7 @@ jobs:
5959
fetch-depth: 0
6060
- uses: actions/setup-go@v5
6161
with:
62-
go-version: 1.25.1
62+
go-version: 1.25.5
6363
- uses: actions/setup-node@v4
6464
with:
6565
node-version: 23

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tasks:
3333
- npm run clean
3434
- npm run copy-docs
3535
- npm version {{.VERSION}}
36-
- npm run build
36+
- npm run build-dashboard
3737
build-npm-package:
3838
deps: [build-vue-app]
3939
cmds:

api/handler_http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type param struct {
5353
Required bool `json:"required"`
5454
Deprecated bool `json:"deprecated"`
5555
Style string `json:"style,omitempty"`
56-
Exploded bool `json:"exploded"`
56+
Explode bool `json:"explode"`
5757
AllowReserved bool `json:"allowReserved"`
5858
Schema *schema.Schema `json:"schema"`
5959
}
@@ -302,7 +302,7 @@ func getParameters(params openapi.Parameters) (result []param) {
302302
Required: p.Value.Required,
303303
Deprecated: p.Value.Deprecated,
304304
Style: p.Value.Style,
305-
Exploded: p.Value.IsExplode(),
305+
Explode: p.Value.IsExplode(),
306306
AllowReserved: p.Value.AllowReserved,
307307
Schema: p.Value.Schema,
308308
}

api/handler_http_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func TestHandler_Http(t *testing.T) {
119119
)
120120
},
121121
requestUrl: "http://foo.api/api/services/http/foo",
122-
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"}}]}]}]`,
122+
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"}}]}]}]`,
123123
},
124124
{
125125
name: "get http service with requestBody",

docs/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
"component": "examples",
161161
"hideNavigation": true,
162162
"hideInNavigation": true,
163-
"canonical": "https://mokapi.io/docs/resources",
163+
"canonical": "https://mokapi.io/docs/resources/tutorials",
164164
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
165165
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
166166
},
@@ -182,7 +182,7 @@
182182
"component": "examples",
183183
"hideNavigation": true,
184184
"hideInNavigation": true,
185-
"canonical": "https://mokapi.io/docs/resources",
185+
"canonical": "https://mokapi.io/docs/resources/examples",
186186
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
187187
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
188188
},
@@ -196,7 +196,7 @@
196196
"component": "examples",
197197
"hideNavigation": true,
198198
"hideInNavigation": true,
199-
"canonical": "https://mokapi.io/docs/resources",
199+
"canonical": "https://mokapi.io/docs/resources/blogs",
200200
"title": "Explore Mokapi Resources: Tutorials, Examples, and Blog Articles",
201201
"description": "Explore Mokapi's resources including tutorials, examples, and blog articles. Learn to mock APIs, validate schemas, and streamline your development."
202202
},

docs/guides/mail/overview.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,12 @@ folders:
237237

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

240-
| Field Name | Type | Default | Description |
241-
|-------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
242-
| maxRecipients | integer | 0 | (Optional) Maximum number of recipients per email. Use 0 for unlimited. |
243-
| autoCreateMailbox | boolean | true | (Optional) Allow create mailboxes at runtime. |
244-
| 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). |
240+
| Field Name | Type | Default | Description |
241+
|-----------------------|---------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
242+
| maxRecipients | integer | 0 | (Optional) Maximum number of recipients per email. Use 0 for unlimited. |
243+
| autoCreateMailbox | boolean | true | (Optional) Allow create mailboxes at runtime. |
244+
| 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). |
245+
| AllowUnknownSenders | boolean | true | (Optional) If true, the server accepts any MAIL FROM: address, even if it’s not listed in the mailboxes: configuration. |
245246

246247
##### Mailbox Object Example
247248

0 commit comments

Comments
 (0)