Skip to content

Commit 3f3e486

Browse files
authored
Merge pull request #845 from marle3003/develop
Develop
2 parents 280704f + 14bc247 commit 3f3e486

File tree

187 files changed

+5921
-4709
lines changed

Some content is hidden

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

187 files changed

+5921
-4709
lines changed

.asyncapi-tool.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Your API Mocking Tool for Agile Development. Mock and simulate AsyncAPI and OpenAPI services for local testing, development, and CI pipelines — with a visual dashboard to inspect your mocks and a powerful test data generator fully customizable with JavaScript.",
44
"links": {
55
"websiteUrl": "https://mokapi.io",
6-
"docsUrl": "https://mokapi.io/docs/guides/welcome",
6+
"docsUrl": "https://mokapi.io/docs/welcome",
77
"repoUrl": "https://github.com/marle3003/mokapi"
88
},
99
"filters": {

.github/actions/build-cli-flags-doc/action.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ name: "Build Mokapi CLI Flags doc"
22
runs:
33
using: composite
44
steps:
5-
- name: Create directory and file
5+
- name: Create dist directory and file
66
shell: bash
77
run: |
88
mkdir -p webui/dist
99
touch webui/dist/.tmp
1010
- name: Build CLI doc
1111
shell: bash
12-
run: go run ./cmd/internal/gen-cli-docs/main.go
13-
- name: Add CLI Flags nav entry
14-
working-directory: ./docs
15-
shell: bash
16-
run: |
17-
jq '.Configuration.items.Static.items["CLI Flags"] = "configuration/static/mokapi.md"' ./config.json > ./tmp.json
18-
mv ./tmp.json ./config.json
12+
run: go run ./cmd/internal/gen-cli-docs/main.go

.github/actions/build-release-notes/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
VERSION=$(jq -r '.release.tag_name' "$GITHUB_EVENT_PATH")
1010
BODY=$(jq -r '.release.body' "$GITHUB_EVENT_PATH")
1111
{
12-
echo "# Mokapi $VERSION"
12+
echo "## Mokapi $VERSION"
1313
echo
1414
echo "$BODY"
1515
} > docs/release.md

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,12 @@ runs:
5151
if: always()
5252
run: docker stop mokapi || true
5353
shell: bash
54-
- name: build webui
54+
- uses: ./.github/actions/build-cli-flags-doc
55+
- name: build website
5556
working-directory: ./webui
5657
run: |
5758
npm install
5859
npm version ${{ steps.release.outputs.release }}
59-
npm run build
60-
shell: bash
61-
- name: Build CLI doc
62-
run: go run ./cmd/internal/gen-cli-docs/main.go
63-
shell: bash
64-
- name: Add CLI Flags nav entry
65-
run: |
66-
jq '.Configuration.items.Static.items["CLI Flags"] = "configuration/static/mokapi.md"' ./config.json > ./tmp.json
67-
mv ./tmp.json ./config.json
68-
working-directory: ./docs
69-
shell: bash
70-
- name: build website
71-
working-directory: ./webui
72-
run: |
7360
npm run copy-docs
7461
npm run build-sitemap
7562
npm run build-website

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
- uses: actions/setup-go@v5
1818
with:
1919
go-version: 1.25.5
20-
- uses: ./.github/actions/build-cli-flags-doc
2120
- uses: ./.github/actions/build-release-notes
2221
- uses: actions/setup-node@v4
2322
with:

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</p>
1515
<p align="center">
1616
<a href="https://github.com/marle3003/mokapi/releases">Download</a> ·
17-
<a href="https://mokapi.io/docs/guides/welcome">Documentation</a>
17+
<a href="https://mokapi.io/docs/welcome">Documentation</a>
1818
</p>
1919

2020
# 🚀 Overview
@@ -99,32 +99,32 @@ Mokapi’s dashboard lets you visualize your mock APIs. View requests and respon
9999

100100
Explore tutorials that walk you through mocking different protocols and scenarios:
101101

102-
- 🌍 [Get started with REST API](https://mokapi.io/docs/resources/tutorials/get-started-with-rest-api)\
102+
- 🌍 [Get started with REST API](https://mokapi.io/resources/tutorials/get-started-with-rest-api)\
103103
This tutorial will show you how to mock a REST API using an OpenAPI specification.
104104

105-
-[Mocking Kafka with AsyncAPI](https://mokapi.io/docs/resources/tutorials/get-started-with-kafka)\
105+
-[Mocking Kafka with AsyncAPI](https://mokapi.io/resources/tutorials/get-started-with-kafka)\
106106
Mocking a Kafka topic using Mokapi and verifying that a producer generates valid messages.
107107

108-
- 👨‍💻 [Mocking LDAP Authentication](https://mokapi.io/docs/resources/tutorials/mock-ldap-authentication-in-node)\
108+
- 👨‍💻 [Mocking LDAP Authentication](https://mokapi.io/resources/tutorials/mock-ldap-authentication-in-node)\
109109
Simulate LDAP-based login flows, including group-based permissions.
110110

111-
- 📧 [Mocking SMTP Mail Servers](https://mokapi.io/docs/resources/tutorials/mock-smtp-server-send-mail-using-node)\
111+
- 📧 [Mocking SMTP Mail Servers](https://mokapi.io/resources/tutorials/mock-smtp-server-send-mail-using-node)\
112112
Use Mokapi to simulate sending and receiving emails in Node.js apps.
113113

114-
- 🖥️ [End-to-End Testing with Jest and GitHub Actions](https://mokapi.io/docs/resources/tutorials/running-mokapi-in-a-ci-cd-pipeline)\
114+
- 🖥️ [End-to-End Testing with Jest and GitHub Actions](https://mokapi.io/resources/tutorials/running-mokapi-in-a-ci-cd-pipeline)\
115115
Integrate Mokapi into your CI pipeline for full-stack E2E testing.
116116

117-
> More examples are available on [mokapi.io/docs/resources](https://mokapi.io/docs/resources)
117+
> More examples are available on [mokapi.io/resources](https://mokapi.io/resources)
118118
119119
# 📚 Documentation
120120

121-
- [Get Started](https://mokapi.io/docs/guides/welcome)
122-
- [HTTP](https://mokapi.io/docs/guides/http)
123-
- [Kafka](https://mokapi.io/docs/guides/kafka)
124-
- [LDAP](https://mokapi.io/docs/guides/ldap)
125-
- [SMTP](https://mokapi.io/docs/guides/mail)
126-
- [Javascript API](https://mokapi.io/docs/javascript-api)
127-
- [Resources](https://mokapi.io/docs/resources)
121+
- [Get Started](https://mokapi.io/docs/welcome)
122+
- [HTTP](https://mokapi.io/docs/http/overview)
123+
- [Kafka](https://mokapi.io/docs/kafka/overview)
124+
- [LDAP](https://mokapi.io/docs/ldap/overview)
125+
- [SMTP](https://mokapi.io/docs/mail/overview)
126+
- [Javascript API](https://mokapi.io/docs/javascript-api/overview)
127+
- [Resources](https://mokapi.io/resources)
128128

129129
# ☕ Support
130130

Taskfile.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ tasks:
2828
GOOS: darwin
2929
GOARCH: arm64
3030
build-vue-app:
31+
deps: [ensure-dist-folder]
3132
dir: webui
3233
cmds:
3334
- npm run clean
3435
- npm run copy-docs
36+
- go run ../cmd/internal/gen-cli-docs/main.go --output-dir ./webui/src/assets/docs/configuration/static
3537
- npm version {{.VERSION}}
3638
- npm run build-dashboard
3739
build-npm-package:
@@ -64,5 +66,9 @@ tasks:
6466
env:
6567
GOOS: darwin
6668
GOARCH: arm64
69+
ensure-dist-folder:
70+
cmds:
71+
- mkdir -p webui/dist
72+
- touch webui/dist/.tmp
6773

6874

acceptance/ldap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type LdapSuite struct {
2020
func (suite *LdapSuite) SetupSuite() {
2121
cfg := static.NewConfig()
2222
cfg.Api.Port = try.GetFreePort()
23-
cfg.Providers.File.Directories = []string{"./ldap"}
23+
cfg.Providers.File.Directories = []static.FileConfig{{Path: "./ldap"}}
2424
suite.initCmd(cfg)
2525
// ensure scripts are executed
2626
time.Sleep(2 * time.Second)

acceptance/mail_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (suite *MailSuite) SetupSuite() {
2727
wd, err := os.Getwd()
2828
require.NoError(suite.T(), err)
2929
cfg.ConfigFile = path.Join(wd, "mokapi.yaml")
30-
cfg.Providers.File.Directories = []string{"./mail"}
30+
cfg.Providers.File.Directories = []static.FileConfig{{Path: "./mail"}}
3131
cfg.Certificates.Static = []static.Certificate{
3232
{Cert: "./mail/mail.mokapi.local.pem"},
3333
}

acceptance/petstore_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type PetStoreSuite struct{ BaseSuite }
2424
func (suite *PetStoreSuite) SetupSuite() {
2525
cfg := static.NewConfig()
2626
cfg.Api.Port = try.GetFreePort()
27-
cfg.Providers.File.Directories = []string{"./petstore"}
27+
cfg.Providers.File.Directories = []static.FileConfig{{Path: "./petstore"}}
2828
cfg.Api.Search.Enabled = true
2929
suite.initCmd(cfg)
3030
}

0 commit comments

Comments
 (0)