Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f9be753
add e2e tests to publishing website
marle3003 Jan 3, 2026
83d3471
add download docker image and load
marle3003 Jan 3, 2026
9445632
fix parameter value
marle3003 Jan 3, 2026
ede6130
fix test config paths
marle3003 Jan 3, 2026
3c4168e
fix routing
marle3003 Jan 3, 2026
227e3a6
disable animation in playwright tests
marle3003 Jan 3, 2026
4fe5678
add store playwright test report
marle3003 Jan 4, 2026
88d3887
fix change id to be unique
marle3003 Jan 4, 2026
b16eece
fix tests for mail configs
marle3003 Jan 4, 2026
892ddcd
fix spacing if promo-banner is visible
marle3003 Jan 4, 2026
294ce62
update new CLI implementation (WIP)
marle3003 Jan 6, 2026
c5dae55
fix reading api-port from env var
marle3003 Jan 6, 2026
1cc6249
fix validUntil configs
marle3003 Jan 6, 2026
9db6915
add doc-gen for new CLI (WIP)
marle3003 Jan 6, 2026
48e7412
improve test stability
marle3003 Jan 6, 2026
6f465e8
fix converting Swagger to OpenAPI using schema type=file
marle3003 Jan 7, 2026
d43c00c
refactor
marle3003 Jan 7, 2026
cb037ea
improve code generator for new CLI
marle3003 Jan 8, 2026
de73202
Bump ldapts from 8.1.2 to 8.1.3 in /webui
dependabot[bot] Jan 9, 2026
43433eb
Merge pull request #800 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 9, 2026
dcfc0d0
Bump vue-tsc from 3.2.1 to 3.2.2 in /webui
dependabot[bot] Jan 9, 2026
b0acdff
Merge pull request #799 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 9, 2026
c106d2c
Bump vite from 7.3.0 to 7.3.1 in /webui
dependabot[bot] Jan 9, 2026
ba97bcf
Merge pull request #798 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 9, 2026
7a8ec62
improve flag value precedence
marle3003 Jan 10, 2026
c479c74
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 10, 2026
5f247a5
improve CLI with default values
marle3003 Jan 11, 2026
69237d7
fix rewrite results to 403
marle3003 Jan 12, 2026
2e73c3b
disable directory slash off
marle3003 Jan 12, 2026
2690c3e
build CLI doc and upload artifact
marle3003 Jan 12, 2026
76fed5c
improve doc generator for CLI
marle3003 Jan 12, 2026
74fed60
fix parsing XML arrays
marle3003 Jan 13, 2026
eaccfdd
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 13, 2026
50c663b
update doc config.json
marle3003 Jan 13, 2026
48c5ba9
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 13, 2026
672df50
fix paths
marle3003 Jan 13, 2026
ebcbf43
improve crawling skip invalid URLs
marle3003 Jan 13, 2026
e7b405e
improve responsiveness
marle3003 Jan 14, 2026
569ec03
update htaccess
marle3003 Jan 14, 2026
0b58d3c
add dummy index.html for go embed
marle3003 Jan 14, 2026
e842e21
update alpha build to include CLI doc
marle3003 Jan 14, 2026
1c56826
fix path
marle3003 Jan 14, 2026
f873c68
improve website styling (WIP)
marle3003 Jan 14, 2026
a2d962b
improve code examples and tabs
marle3003 Jan 15, 2026
9538969
improve doc for CLI
marle3003 Jan 15, 2026
d66636e
Bump prettier from 3.7.4 to 3.8.0 in /webui
dependabot[bot] Jan 16, 2026
7f8da4e
Bump golang.org/x/net from 0.48.0 to 0.49.0
dependabot[bot] Jan 16, 2026
807e80f
Bump github.com/sirupsen/logrus from 1.9.3 to 1.9.4
dependabot[bot] Jan 16, 2026
071e2ae
Merge pull request #803 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 16, 2026
6ff03f0
Bump @types/node from 25.0.3 to 25.0.9 in /webui
dependabot[bot] Jan 16, 2026
463bba3
Merge pull request #806 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 16, 2026
916ef85
Bump @types/nodemailer from 7.0.4 to 7.0.5 in /webui
dependabot[bot] Jan 16, 2026
ecdd168
Merge pull request #807 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 16, 2026
ba34145
update home page
marle3003 Jan 17, 2026
6e7760a
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 17, 2026
d3f4774
update test
marle3003 Jan 17, 2026
a65108a
update home page
marle3003 Jan 17, 2026
c8e8c72
improve alt text
marle3003 Jan 17, 2026
1c39227
Merge branch 'develop' into dependabot/go_modules/develop/github.com/…
marle3003 Jan 17, 2026
9d64ffa
Merge pull request #805 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Jan 17, 2026
7f820d3
Merge branch 'develop' into dependabot/go_modules/develop/golang.org/…
marle3003 Jan 17, 2026
59bcdf3
Merge pull request #804 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Jan 17, 2026
c953576
Bump github.com/blevesearch/bleve_index_api from 1.2.11 to 1.3.0
dependabot[bot] Jan 17, 2026
0f41e79
Merge pull request #801 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Jan 17, 2026
49c51da
improve HTTP page
marle3003 Jan 17, 2026
79ba452
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 17, 2026
e00eb74
update kafka page
marle3003 Jan 18, 2026
f823159
update test
marle3003 Jan 18, 2026
1c16f1d
update kafka dashboard image
marle3003 Jan 18, 2026
8769bdb
update kafka dashboard image
marle3003 Jan 18, 2026
16703f0
update LDAP page
marle3003 Jan 18, 2026
747c148
update mail page
marle3003 Jan 18, 2026
fb19d80
fix test and set button size
marle3003 Jan 18, 2026
3c0f892
improve home page styling
marle3003 Jan 18, 2026
7fd8025
improve SEO
marle3003 Jan 18, 2026
0eeaf63
improve SEO
marle3003 Jan 19, 2026
a49aee2
improve SEO
marle3003 Jan 19, 2026
71beb63
improve SEO
marle3003 Jan 19, 2026
55c62f9
improve doc for CLI
marle3003 Jan 19, 2026
7872b5c
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Jan 19, 2026
2378fdd
enable search in the dashboard by default
marle3003 Jan 21, 2026
aa4fdeb
fix test using new default value for search in dashboard
marle3003 Jan 21, 2026
d24513f
add some tests
marle3003 Jan 21, 2026
09b167b
add test for generating docs
marle3003 Jan 22, 2026
f31b06a
add test for generating docs
marle3003 Jan 22, 2026
d7913ca
add tests
marle3003 Jan 22, 2026
be7f4a0
add tests
marle3003 Jan 22, 2026
c9c3917
Bump vue from 3.5.26 to 3.5.27 in /webui
dependabot[bot] Jan 23, 2026
87802be
Merge pull request #810 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 23, 2026
f25763a
Bump cors from 2.8.5 to 2.8.6 in /webui
dependabot[bot] Jan 23, 2026
58564a9
Merge pull request #813 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 23, 2026
9846c86
Bump vue-tsc from 3.2.2 to 3.2.3 in /webui
dependabot[bot] Jan 23, 2026
f8848e4
Merge pull request #811 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 23, 2026
5151b44
Bump prettier from 3.8.0 to 3.8.1 in /webui
dependabot[bot] Jan 23, 2026
2ebddf8
Merge pull request #809 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 23, 2026
40a246a
Bump whatwg-mimetype from 4.0.0 to 5.0.0 in /webui
dependabot[bot] Jan 23, 2026
172ac9d
fix errors after upgrading whatwg-mimetype 5.0 with workaround
marle3003 Jan 23, 2026
2f30fcd
fix TypeScript typings
marle3003 Jan 23, 2026
a2d64e0
Merge pull request #812 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Jan 23, 2026
b3b1995
add tests
marle3003 Jan 23, 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
12 changes: 12 additions & 0 deletions .github/actions/build-mokapi-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.25.5
- name: Build CLI doc
run: go run ./cmd/internal/gen-cli-docs/main.go
shell: bash
- name: Add CLI Flags nav entry
run: |
jq '.Configuration.items.Static.items["CLI Flags"] = "configuration/static/mokapi.md"' ./config.json > ./tmp.json
mv ./tmp.json ./config.json
working-directory: ./docs
shell: bash
- name: Build docker alpha image
run: docker build --build-arg VERSION=${{ inputs.version }} -t ${{ inputs.image-name }} -t mokapi/mokapi:alpha -f ./images/alpha.Dockerfile .
shell: bash
Expand Down
35 changes: 34 additions & 1 deletion .github/actions/publish-website/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ runs:
repository: marle3003/mokapi
excludes: prerelease, draft
token: ${{ inputs.token }}
- name: Download image
id: download
uses: actions/download-artifact@v4
with:
name: ${{ env.image-artifact-name }}
path: /tmp
- name: Load image
run: docker load --input /tmp/mokapi.tar
shell: bash
- 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
Expand All @@ -42,11 +51,25 @@ runs:
if: always()
run: docker stop mokapi || true
shell: bash
- name: build website
- name: build webui
working-directory: ./webui
run: |
npm install
npm version ${{ steps.release.outputs.release }}
npm run build
shell: bash
- name: Build CLI doc
run: go run ./cmd/internal/gen-cli-docs/main.go
shell: bash
- name: Add CLI Flags nav entry
run: |
jq '.Configuration.items.Static.items["CLI Flags"] = "configuration/static/mokapi.md"' ./config.json > ./tmp.json
mv ./tmp.json ./config.json
working-directory: ./docs
shell: bash
- name: build website
working-directory: ./webui
run: |
npm run copy-docs
npm run build-sitemap
npm run build-website
Expand All @@ -55,6 +78,16 @@ runs:
working-directory: ./webui
run: npx playwright install --with-deps
shell: bash
- name: test website
working-directory: ./webui
run: npx playwright test --project=website
shell: bash
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: website-test-report
path: webui/playwright-report
- name: prerender
working-directory: ./webui/ssg
run: node index.js
Expand Down
6 changes: 3 additions & 3 deletions acceptance/ldap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package acceptance

import (
"fmt"
"github.com/stretchr/testify/require"
"mokapi/config/static"
"mokapi/ldap"
"mokapi/runtime/metrics"
"mokapi/try"
"net/http"
"time"

"github.com/stretchr/testify/require"
)

type LdapSuite struct {
Expand All @@ -18,8 +19,7 @@ type LdapSuite struct {

func (suite *LdapSuite) SetupSuite() {
cfg := static.NewConfig()
port := try.GetFreePort()
cfg.Api.Port = fmt.Sprintf("%v", port)
cfg.Api.Port = try.GetFreePort()
cfg.Providers.File.Directories = []string{"./ldap"}
suite.initCmd(cfg)
// ensure scripts are executed
Expand Down
3 changes: 1 addition & 2 deletions acceptance/mail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ type MailSuite struct{ BaseSuite }

func (suite *MailSuite) SetupSuite() {
cfg := static.NewConfig()
port := try.GetFreePort()
cfg.Api.Port = fmt.Sprintf("%v", port)
cfg.Api.Port = try.GetFreePort()
wd, err := os.Getwd()
require.NoError(suite.T(), err)
cfg.ConfigFile = path.Join(wd, "mokapi.yaml")
Expand Down
9 changes: 4 additions & 5 deletions acceptance/petstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ type PetStoreSuite struct{ BaseSuite }

func (suite *PetStoreSuite) SetupSuite() {
cfg := static.NewConfig()
port := try.GetFreePort()
cfg.Api.Port = fmt.Sprintf("%v", port)
cfg.Api.Port = try.GetFreePort()
cfg.Providers.File.Directories = []string{"./petstore"}
cfg.Api.Search.Enabled = true
suite.initCmd(cfg)
Expand Down Expand Up @@ -172,7 +171,7 @@ func (suite *PetStoreSuite) TestJsHttpHandler() {
try.BodyContains(`"name":"Zoe"`))

// test http metrics
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%s/api/metrics/http?path=/pet/{petId}", suite.cfg.Api.Port), nil,
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%d/api/metrics/http?path=/pet/{petId}", suite.cfg.Api.Port), nil,
try.BodyContains(`http_requests_total{service=\"Swagger Petstore\",endpoint=\"/pet/{petId}\"}","value":4}`),
)
}
Expand Down Expand Up @@ -307,12 +306,12 @@ func (suite *PetStoreSuite) TestKafkaEventAndMetrics() {
time.Sleep(3 * time.Second)

// test kafka metrics
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%s/api/metrics/kafka", suite.cfg.Api.Port), nil,
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%d/api/metrics/kafka", suite.cfg.Api.Port), nil,
try.BodyContains(`kafka_messages_total{service=\"A sample AsyncApi Kafka streaming api\",topic=\"petstore.order-event\"}","value":1}`),
)

// test kafka events, header added by JavaScript event handler
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%s/api/events?namespace=kafka", suite.cfg.Api.Port), nil,
try.GetRequest(suite.T(), fmt.Sprintf("http://127.0.0.1:%d/api/events?namespace=kafka", suite.cfg.Api.Port), nil,
try.BodyContains(`"headers":{"foo":{"value":"bar","binary":"YmFy"}`),
try.BodyContains(`"messageId":"order"`),
)
Expand Down
15 changes: 8 additions & 7 deletions api/handler_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package api_test

import (
"github.com/stretchr/testify/require"
"mokapi/api"
"mokapi/config/static"
"mokapi/providers/openapi"
Expand All @@ -11,6 +10,8 @@ import (
"net/http"
"net/http/httptest"
"testing"

"github.com/stretchr/testify/require"
)

func TestHandler_ServeHTTP(t *testing.T) {
Expand Down Expand Up @@ -57,7 +58,7 @@ func TestHandler_ServeHTTP(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","search":{"enabled":false}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","search":{"enabled":false}}`))
},
},
{
Expand Down Expand Up @@ -120,7 +121,7 @@ func TestHandler_Api_Info(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","activeServices":["http"],"search":{"enabled":false}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","activeServices":["http"],"search":{"enabled":false}}`))
},
},
{
Expand All @@ -135,7 +136,7 @@ func TestHandler_Api_Info(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","activeServices":["kafka"],"search":{"enabled":false}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","activeServices":["kafka"],"search":{"enabled":false}}`))
},
},
{
Expand All @@ -150,7 +151,7 @@ func TestHandler_Api_Info(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","activeServices":["mail"],"search":{"enabled":false}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","activeServices":["mail"],"search":{"enabled":false}}`))
},
},
{
Expand All @@ -165,7 +166,7 @@ func TestHandler_Api_Info(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","activeServices":["ldap"],"search":{"enabled":false}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","activeServices":["ldap"],"search":{"enabled":false}}`))
},
},
}
Expand Down Expand Up @@ -204,5 +205,5 @@ func TestHandler_SearchEnabled(t *testing.T) {
h,
try.HasStatusCode(200),
try.HasHeader("Content-Type", "application/json"),
try.HasBody(`{"version":"","buildTime":"","search":{"enabled":true}}`))
try.HasBody(`{"version":"0.0.0","buildTime":"","search":{"enabled":true}}`))
}
13 changes: 13 additions & 0 deletions cmd/internal/gen-cli-docs/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import (
"mokapi/pkg/cmd/mokapi"
"os"
)

func main() {
err := mokapi.NewGenCliDocCmd().Execute()
if err != nil {
_, _ = os.Stderr.Write([]byte(err.Error()))
}
}
85 changes: 0 additions & 85 deletions cmd/mokapi/help.go

This file was deleted.

Loading
Loading