Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7ace3c9
doc: update documentation and styles
marle3003 Mar 12, 2026
28531c4
build(deps): bump golang.org/x/text from 0.34.0 to 0.35.0
dependabot[bot] Mar 13, 2026
ed38284
build(deps): bump dayjs from 1.11.19 to 1.11.20 in /webui
dependabot[bot] Mar 13, 2026
21dc338
Merge pull request #878 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 13, 2026
e5fc400
build(deps-dev): bump @types/node from 25.3.2 to 25.5.0 in /webui
dependabot[bot] Mar 13, 2026
7d02a0b
Merge pull request #881 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 13, 2026
fce68cc
build(deps): bump vue from 3.5.28 to 3.5.30 in /webui
dependabot[bot] Mar 13, 2026
d5b1776
Merge pull request #884 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 13, 2026
46869be
build(deps): bump nodemailer from 8.0.1 to 8.0.2 in /webui
dependabot[bot] Mar 13, 2026
670575d
Merge pull request #885 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 13, 2026
78b16bd
build(deps-dev): bump vite from 7.3.1 to 8.0.0 in /webui
dependabot[bot] Mar 13, 2026
5c48399
fix(config): add support for reading configs without file extension (…
marle3003 Mar 16, 2026
8ea9857
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Mar 16, 2026
77e9e02
fix(config): fix parsing JSON/YAML when data is not a pointer
marle3003 Mar 16, 2026
862aa4b
fix(config): fix parsing JSON/YAML when data is not a pointer
marle3003 Mar 16, 2026
465f7af
fix(config): add default server if none is specified
marle3003 Mar 17, 2026
342278a
fix(jsonschema): fix parsing schema with recursion
marle3003 Mar 17, 2026
7553365
fix(http): add default server only after patching
marle3003 Mar 17, 2026
2ec1140
fix(schema): improve resolving JSON references
marle3003 Mar 19, 2026
8f062cc
Merge branch 'develop' into dependabot/go_modules/develop/golang.org/…
marle3003 Mar 19, 2026
3e2ad38
Merge pull request #877 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Mar 19, 2026
16c9a87
build(deps): bump golang.org/x/net from 0.51.0 to 0.52.0
dependabot[bot] Mar 19, 2026
af5a50b
Merge pull request #880 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Mar 19, 2026
72e1b55
build(deps): bump github.com/bradleyfalzon/ghinstallation/v2
dependabot[bot] Mar 19, 2026
4f7ef5b
Merge pull request #879 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Mar 19, 2026
07743c1
build(deps): bump github.com/evanw/esbuild from 0.27.3 to 0.27.4
dependabot[bot] Mar 19, 2026
7fb59aa
Merge pull request #882 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Mar 19, 2026
0e08d0c
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/vit…
marle3003 Mar 19, 2026
ad5bbe2
fix(webui): use new syntax query: '?raw'
marle3003 Mar 19, 2026
a5f3f76
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/webui/de…
marle3003 Mar 19, 2026
363f6bb
Merge pull request #883 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 19, 2026
6febf21
Merge branch 'main' into develop
marle3003 Mar 19, 2026
f46318a
build(deps): bump vue-router from 5.0.3 to 5.0.4 in /webui
dependabot[bot] Mar 20, 2026
ed3efa2
Merge pull request #888 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 20, 2026
cab7f9d
build(deps): bump ldapts from 8.1.6 to 8.1.7 in /webui
dependabot[bot] Mar 20, 2026
a0967ac
Merge pull request #891 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 20, 2026
2361014
build(deps-dev): bump vite from 8.0.0 to 8.0.1 in /webui
dependabot[bot] Mar 20, 2026
4eafe3a
Merge pull request #890 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 20, 2026
924af52
build(deps-dev): bump eslint from 10.0.2 to 10.0.3 in /webui
dependabot[bot] Mar 20, 2026
7eeb856
Merge pull request #889 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 20, 2026
d411ca7
build(deps-dev): bump vue-tsc from 3.2.5 to 3.2.6 in /webui
dependabot[bot] Mar 20, 2026
9b67275
Merge pull request #892 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Mar 20, 2026
3cbf1f7
test: add new test
marle3003 Mar 21, 2026
791af4a
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/vit…
marle3003 Mar 21, 2026
b712563
Merge pull request #894 from marle3003/dependabot/npm_and_yarn/webui/…
marle3003 Mar 21, 2026
e0df1f3
Merge branch 'main' into develop
marle3003 Mar 21, 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
4 changes: 2 additions & 2 deletions acceptance/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func Start(cfg *static.Config) (*Cmd, error) {
feature.Enable(cfg.Features)

registerDynamicTypes()
app := runtime.New(cfg)
generator.SetConfig(cfg.DataGen)

watcher := server.NewConfigWatcher(cfg)
app := runtime.New(cfg, watcher)
generator.SetConfig(cfg.DataGen)

certStore, err := cert.NewStore(cfg)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions api/handler_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"mokapi/config/dynamic/dynamictest"
"mokapi/config/static"
"mokapi/providers/asyncapi3/kafka/store"
"mokapi/providers/openapi"
Expand Down Expand Up @@ -202,7 +203,7 @@ func TestHandler_Events(t *testing.T) {
tc := tc
t.Run(tc.name, func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})

h := New(app, static.Api{})
tc.fn(t, h, app.Events)
Expand Down Expand Up @@ -330,7 +331,7 @@ func TestHandler_KafkaEvents(t *testing.T) {
tc := tc
t.Run(tc.name, func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})

h := New(app, static.Api{})
tc.fn(t, h, app.Events)
Expand Down
15 changes: 8 additions & 7 deletions api/handler_fileserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"mokapi/api"
"mokapi/config/dynamic"
"mokapi/config/dynamic/dynamictest"
"mokapi/config/static"
"mokapi/providers/openapi/openapitest"
"mokapi/runtime"
Expand Down Expand Up @@ -131,7 +132,7 @@ func TestHandler_FileServer(t *testing.T) {
t.Parallel()

cfg := &static.Config{}
h := api.New(runtime.New(cfg), tc.config)
h := api.New(runtime.New(cfg, &dynamictest.Reader{}), tc.config)
tc.fn(t, h)
})
}
Expand All @@ -146,7 +147,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0", openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."))})
h := api.New(app, static.Api{Path: "/mokapi", Dashboard: true})
try.Handler(t,
Expand All @@ -166,7 +167,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service path without summary and description",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0",
openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."),
openapitest.WithPath("/pet/{petId}"),
Expand All @@ -190,7 +191,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service path with summary and description",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0",
openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."),
openapitest.WithPath("/pet/{petId}",
Expand All @@ -216,7 +217,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service path with no summary but description",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0",
openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."),
openapitest.WithPath("/pet/{petId}",
Expand All @@ -241,7 +242,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service endpoint no summary and no description",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0",
openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."),
openapitest.WithPath("/pet/{petId}",
Expand All @@ -266,7 +267,7 @@ func TestOpenGraphInDashboard(t *testing.T) {
name: "http service endpoint get right path",
test: func(t *testing.T) {
cfg := &static.Config{}
app := runtime.New(cfg)
app := runtime.New(cfg, &dynamictest.Reader{})
app.AddHttp(&dynamic.Config{Info: dynamic.ConfigInfo{Url: mustParse("https://foo.bar")}, Data: openapitest.NewConfig("3.0",
openapitest.WithInfo("Swagger Petstore", "1.0", "This is a sample server Petstore server."),
openapitest.WithPath("/pet/{petId}",
Expand Down
4 changes: 2 additions & 2 deletions api/handler_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestHandler_Http(t *testing.T) {
{
name: "get http service info",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
cfg := &dynamic.Config{
Info: dynamictest.NewConfigInfo(), Data: openapitest.NewConfig("3.0.0",
openapitest.WithInfo("foo", "1.0", "bar"),
Expand Down Expand Up @@ -328,7 +328,7 @@ func TestHandler_Http(t *testing.T) {

func TestHandler_Http_NotFound(t *testing.T) {
cfg := &static.Config{}
h := New(runtime.New(cfg), static.Api{})
h := New(runtime.New(cfg, &dynamictest.Reader{}), static.Api{})

try.Handler(t,
http.MethodGet,
Expand Down
27 changes: 24 additions & 3 deletions api/handler_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"time"

"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)

type kafkaSummary struct {
Expand Down Expand Up @@ -564,18 +565,38 @@ func newTopic(t *store.Topic, ch *asyncapi3.Channel, cfg *asyncapi3.Config) topi
}

if msg.Payload != nil && msg.Payload.Value != nil {
m.Payload = &schemaInfo{Schema: msg.Payload.Value.Schema, Format: msg.Payload.Value.Format}
format := ""
if msf, ok := msg.Payload.Value.(*asyncapi3.MultiSchemaFormat); ok {
format = msf.Format
}
s, err := msg.Payload.GetSchema()
if err != nil {
log.Errorf("failed to get schema for message in topic '%s': %v", t.Name, err)
}
m.Payload = &schemaInfo{Schema: s, Format: format}
}
if msg.Headers != nil && msg.Headers.Value != nil {
m.Header = &schemaInfo{Schema: msg.Headers.Value.Schema, Format: msg.Headers.Value.Format}
format := ""
if msf, ok := msg.Headers.Value.(*asyncapi3.MultiSchemaFormat); ok {
format = msf.Format
}
s, err := msg.Headers.GetSchema()
if err != nil {
log.Errorf("failed to get schema for headers in topic '%s': %v", t.Name, err)
}
m.Header = &schemaInfo{Schema: s, Format: format}
}

if m.ContentType == "" {
m.ContentType = cfg.DefaultContentType
}

if msg.Bindings.Kafka.Key != nil {
m.Key = &schemaInfo{Schema: msg.Bindings.Kafka.Key.Value.Schema}
s, err := msg.Bindings.Kafka.Key.GetSchema()
if err != nil {
log.Errorf("failed to get schema for key in topic '%s': %v", t.Name, err)
}
m.Key = &schemaInfo{Schema: s}
}
if result.Messages == nil {
result.Messages = map[string]messageConfig{}
Expand Down
52 changes: 30 additions & 22 deletions api/handler_kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"mokapi/api"
"mokapi/config/dynamic"
"mokapi/config/dynamic/asyncApi"
"mokapi/config/dynamic/dynamictest"
"mokapi/config/static"
"mokapi/engine/enginetest"
Expand Down Expand Up @@ -57,7 +58,7 @@ func TestHandler_Kafka(t *testing.T) {
{
name: "get kafka services",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -91,7 +92,7 @@ func TestHandler_Kafka(t *testing.T) {
{
name: "get specific",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
cfg := &dynamic.Config{
Info: dynamictest.NewConfigInfo(),
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -221,7 +222,7 @@ func TestHandler_Kafka(t *testing.T) {
{
name: "get specific with group",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
app.Kafka.Set("foo", getKafkaInfoWithGroup(asyncapi3test.NewConfig(
asyncapi3test.WithInfo("foo", "bar", "1.0"),
asyncapi3test.WithServer("foo", "kafka", "foo.bar"),
Expand All @@ -246,7 +247,7 @@ func TestHandler_Kafka(t *testing.T) {
{
name: "get specific with group no generation",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
app.Kafka.Set("foo", getKafkaInfoWithGroup(asyncapi3test.NewConfig(
asyncapi3test.WithInfo("foo", "bar", "1.0"),
asyncapi3test.WithServer("foo", "kafka", "foo.bar"),
Expand All @@ -273,7 +274,7 @@ func TestHandler_Kafka(t *testing.T) {
return t1
}

app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
app.Kafka.Set("foo", getKafkaInfoWithGroup(asyncapi3test.NewConfig(
asyncapi3test.WithInfo("foo", "bar", "1.0"),
asyncapi3test.WithServer("foo", "kafka", "foo.bar"),
Expand Down Expand Up @@ -321,7 +322,7 @@ func TestHandler_Kafka(t *testing.T) {
{
name: "get specific with topic and openapi schema",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
app.Kafka.Set("foo", getKafkaInfo(asyncapi3test.NewConfig(
asyncapi3test.WithInfo("foo", "bar", "1.0"),
asyncapi3test.WithChannel("foo",
Expand Down Expand Up @@ -369,7 +370,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get kafka topics but empty",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand All @@ -394,7 +395,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get kafka topics with one topic",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -424,7 +425,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get specific kafka topic",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -454,7 +455,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get specific kafka topic but not found",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -482,7 +483,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce kafka message into topic",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/json"),
Expand Down Expand Up @@ -532,7 +533,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce kafka message into topic using binary",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -571,7 +572,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce invalid kafka message into topic",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/json"),
Expand Down Expand Up @@ -627,7 +628,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get kafka partitions",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -656,7 +657,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get specific kafka partition",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})
_, _ = app.Kafka.Add(&dynamic.Config{
Info: dynamic.ConfigInfo{Url: try.MustUrl("kafka.yaml")},
Data: asyncapi3test.NewConfig(
Expand Down Expand Up @@ -685,7 +686,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce kafka message into specific partition",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/json"),
Expand Down Expand Up @@ -739,7 +740,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce kafka message into specific partition using XML",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/xml"),
Expand Down Expand Up @@ -801,7 +802,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce kafka message into specific partition using plain XML string",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/xml"),
Expand Down Expand Up @@ -853,7 +854,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "produce invalid kafka message into specific partition using plain XML string",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/xml"),
Expand Down Expand Up @@ -912,7 +913,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get records",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/json"),
Expand Down Expand Up @@ -970,7 +971,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
{
name: "get specific record",
app: func() *runtime.App {
app := runtime.New(&static.Config{})
app := runtime.New(&static.Config{}, &dynamictest.Reader{})

msg := asyncapi3test.NewMessage(
asyncapi3test.WithContentType("application/json"),
Expand Down Expand Up @@ -1035,7 +1036,7 @@ func TestHandler_KafkaAPI(t *testing.T) {
}

func TestHandler_Kafka_NotFound(t *testing.T) {
h := api.New(runtime.New(&static.Config{}), static.Api{})
h := api.New(runtime.New(&static.Config{}, &dynamictest.Reader{}), static.Api{})

try.Handler(t,
http.MethodGet,
Expand Down Expand Up @@ -1096,6 +1097,13 @@ func TestHandler_Kafka_Metrics(t *testing.T) {
}
}

func Test_IsAsyncApiConfig(t *testing.T) {
v2 := &asyncApi.Config{Info: asyncApi.Info{Name: "foo"}}
_, ok := runtime.IsAsyncApiConfig(&dynamic.Config{Data: v2})
require.True(t, ok)

}

func getKafkaInfo(config *asyncapi3.Config) *runtime.KafkaInfo {
return &runtime.KafkaInfo{
Config: config,
Expand Down
Loading
Loading