Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1620619
build(deps): bump github.com/go-git/go-git/v5 from 5.17.1 to 5.17.2
dependabot[bot] Apr 3, 2026
7a81faa
Merge pull request #911 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 3, 2026
46fbd9f
build(deps): bump github.com/yuin/gopher-lua from 1.1.1 to 1.1.2
dependabot[bot] Apr 3, 2026
428d03f
Merge pull request #908 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 3, 2026
55b8da0
build(deps): bump github.com/blevesearch/bleve_index_api
dependabot[bot] Apr 3, 2026
4aa9dfb
chore(test): move tests into one folder
marle3003 Apr 3, 2026
8317ed0
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 3, 2026
9d65fbe
chore(test): update test
marle3003 Apr 3, 2026
23f3904
chore(test): fix test
marle3003 Apr 3, 2026
4d26593
chore(test): fix path to mocks
marle3003 Apr 3, 2026
b8a032e
chore(test): move tests
marle3003 Apr 3, 2026
635f238
build(deps): bump fuse.js from 7.1.0 to 7.2.0 in /webui
dependabot[bot] Apr 3, 2026
438c6e7
build(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /webui
dependabot[bot] Apr 3, 2026
f82db98
test: fix paths
marle3003 Apr 3, 2026
fe4e31f
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/typ…
marle3003 Apr 3, 2026
d906e80
chore(webui): remove deprecated baseUrl
marle3003 Apr 3, 2026
77bb709
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/typ…
marle3003 Apr 3, 2026
44030de
Merge pull request #916 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 3, 2026
44e7988
Merge branch 'develop' into dependabot/npm_and_yarn/webui/develop/fus…
marle3003 Apr 3, 2026
c04bcc0
Merge pull request #915 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 3, 2026
0cc7178
build(deps): bump vue from 3.5.30 to 3.5.32 in /webui
dependabot[bot] Apr 3, 2026
1d0b65b
Merge pull request #912 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 3, 2026
7ec9a91
build(deps-dev): bump vite from 8.0.1 to 8.0.3 in /webui
dependabot[bot] Apr 3, 2026
8853265
Merge pull request #914 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 3, 2026
10b134f
Merge branch 'develop' into dependabot/go_modules/develop/github.com/…
marle3003 Apr 3, 2026
04369ea
Merge pull request #910 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 3, 2026
4c23f56
build(deps): bump github.com/evanw/esbuild from 0.27.4 to 0.28.0
dependabot[bot] Apr 3, 2026
bbfb478
Merge pull request #909 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 3, 2026
1df7705
fix(swagger): convert responses and parameters
marle3003 Apr 5, 2026
b40be93
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 5, 2026
20cc96d
fix(json reference): fix resolving json reference after patching whic…
marle3003 Apr 7, 2026
68ee148
build(deps): bump fuse.js from 7.2.0 to 7.3.0 in /webui
dependabot[bot] Apr 10, 2026
3b7d92b
Merge pull request #926 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 10, 2026
e0f6417
build(deps-dev): bump eslint from 10.1.0 to 10.2.0 in /webui
dependabot[bot] Apr 10, 2026
3077053
Merge pull request #922 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 10, 2026
5128102
build(deps-dev): bump prettier from 3.8.1 to 3.8.2 in /webui
dependabot[bot] Apr 10, 2026
d26932b
Merge pull request #925 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 10, 2026
b7dd16e
build(deps): bump nodemailer and @types/nodemailer in /webui
dependabot[bot] Apr 10, 2026
44897cb
Merge pull request #927 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 10, 2026
04a02c2
build(deps-dev): bump vite from 8.0.3 to 8.0.8 in /webui
dependabot[bot] Apr 10, 2026
2a79782
Merge pull request #928 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 10, 2026
fa18fc8
fix(json reference): fix resolving json reference after patching whic…
marle3003 Apr 12, 2026
4dda163
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 12, 2026
94a24bd
wip: implement mcp server code mode
marle3003 Apr 15, 2026
4c41805
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 15, 2026
f29b9b7
wip: mcp server execute code
marle3003 Apr 17, 2026
65855cb
wip: mcp server execute code
marle3003 Apr 17, 2026
157567b
build(deps): bump github.com/go-git/go-git/v5 from 5.17.2 to 5.18.0
dependabot[bot] Apr 17, 2026
8891132
build(deps-dev): bump @types/node from 25.5.1 to 25.6.0 in /webui
dependabot[bot] Apr 17, 2026
28b81cb
Merge pull request #934 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 17, 2026
082a437
build(deps-dev): bump prettier from 3.8.2 to 3.8.3 in /webui
dependabot[bot] Apr 17, 2026
e339b63
Merge pull request #937 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 17, 2026
7322e27
build(deps-dev): bump @vitejs/plugin-vue from 6.0.5 to 6.0.6 in /webui
dependabot[bot] Apr 17, 2026
00bc3be
Merge pull request #935 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 17, 2026
320cf77
build(deps-dev): bump typescript from 6.0.2 to 6.0.3 in /webui
dependabot[bot] Apr 17, 2026
910b0eb
Merge pull request #936 from marle3003/dependabot/npm_and_yarn/webui/…
github-actions[bot] Apr 17, 2026
ed3bc11
Merge remote-tracking branch 'origin/main' into develop
marle3003 Apr 17, 2026
1b032c2
test: add LDAP search with scope whole subtree
marle3003 Apr 17, 2026
79c9cc7
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 17, 2026
d952dc3
Merge remote-tracking branch 'origin/main' into develop
marle3003 Apr 17, 2026
4c0502c
test: add test for LDAP search if no equality is specified in schema
marle3003 Apr 17, 2026
c1cf3b8
Merge remote-tracking branch 'origin/main' into develop
marle3003 Apr 17, 2026
1a83866
test: add test for LDIF folded comment
marle3003 Apr 17, 2026
53bf75b
Merge branch 'develop' into dependabot/go_modules/develop/github.com/…
marle3003 Apr 17, 2026
082dbe0
Merge pull request #933 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 17, 2026
25d8c52
build(deps): bump golang.org/x/text from 0.35.0 to 0.36.0
dependabot[bot] Apr 17, 2026
2be2a3f
Merge pull request #924 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 17, 2026
9eefc59
build(deps): bump golang.org/x/net from 0.52.0 to 0.53.0
dependabot[bot] Apr 17, 2026
1d8f20b
Merge pull request #920 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 17, 2026
dd4fd45
build(deps): bump github.com/modelcontextprotocol/go-sdk
dependabot[bot] Apr 17, 2026
222faa1
Merge pull request #923 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 17, 2026
223b05a
build(deps): bump github.com/blevesearch/bleve_index_api
dependabot[bot] Apr 17, 2026
333574c
Merge pull request #921 from marle3003/dependabot/go_modules/develop/…
github-actions[bot] Apr 17, 2026
d4c9b69
wip: fix setup for tool mokapi_execute_code
marle3003 Apr 17, 2026
c843966
Merge remote-tracking branch 'origin/develop' into develop
marle3003 Apr 17, 2026
98f72dc
wip: also make resources available via tool
marle3003 Apr 19, 2026
d52cf43
wip: mcp server execute code
marle3003 Apr 20, 2026
6ccb2be
fix(kafka): fix converting AsyncAPI 2.0 to 3.0
marle3003 Apr 21, 2026
d082040
fix(mcp): improve log output
marle3003 Apr 21, 2026
8dd338f
wip(mcp): improve agent guiding
marle3003 Apr 21, 2026
99e6faa
fix(webui): fix navigation history back
marle3003 Apr 21, 2026
1242d5b
Merge remote-tracking branch 'origin/main' into develop
marle3003 Apr 21, 2026
c0bb34d
test(ldap): add test for parentheses are not mandatory when MUST and …
marle3003 Apr 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 .github/actions/run-frontend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
run: docker load --input /tmp/mokapi.tar
shell: bash
- name: Run mokapi image
run: docker run --name mokapi --rm -d -p 8090:8090 -p 8091:8091 --mount type=bind,source=$(pwd)/examples/mokapi,target=/data --env MOKAPI_Log_Level=Debug --env MOKAPI_Api_Port=8091 --env MOKAPI_Api_Path=/mokapi --env MOKAPI_Providers_File_Directory=/data ${{ inputs.image-name }}
run: docker run --name mokapi --rm -d -p 8090:8090 -p 8091:8091 --mount type=bind,source=$(pwd)/webui/e2e/mocks,target=/data --env MOKAPI_Log_Level=Debug --env MOKAPI_Api_Port=8091 --env MOKAPI_Api_Path=/mokapi --env MOKAPI_Providers_File_Directory=/data ${{ inputs.image-name }}
shell: bash
- uses: actions/setup-node@v4
with:
Expand All @@ -49,7 +49,7 @@ runs:
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-test-report }}
path: webui/playwright-report
path: ./webui/playwright-report
- name: Save Mokapi logs
if: always()
run: docker logs mokapi > /var/tmp/mokapi.log 2>&1
Expand Down
4 changes: 4 additions & 0 deletions api/handler_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ func getHttpServices(list []*runtime.HttpInfo, m *monitor.Monitor) []interface{}
Type: ServiceHttp,
}

if hs.Info.Summary != "" {
s.Description = hs.Info.Summary
}

if m != nil {
s.Metrics = m.FindAll(metrics.ByNamespace("http"), metrics.ByLabel("service", hs.Info.Name))
}
Expand Down
17 changes: 15 additions & 2 deletions api/handler_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ func TestHandler_Http(t *testing.T) {
requestUrl: "http://foo.api/api/services",
responseBody: `[{"name":"foo","description":"bar","version":"1.0","type":"http"}`,
},
{
name: "summary takes precedence over description",
app: func() *runtime.App {
return runtimetest.NewHttpApp(
openapitest.NewConfig("3.0.0",
openapitest.WithInfo("foo", "1.0", "bar"),
openapitest.WithSummary("summary"),
),
)
},
requestUrl: "http://foo.api/api/services",
responseBody: `[{"name":"foo","description":"summary","version":"1.0","type":"http"}`,
},
{
name: "get http services with contact",
app: func() *runtime.App {
Expand Down Expand Up @@ -210,7 +223,7 @@ func TestHandler_Http(t *testing.T) {
c := openapitest.NewConfig("3.0.0",
openapitest.WithInfo("foo", "", ""),
openapitest.WithPathRef("/foo/{bar}", &openapi.PathRef{
Reference: dynamic.Reference{
Reference: dynamic.Reference[*openapi.PathRef]{
Ref: "#/components/pathItems/foo",
Summary: "Summary",
Description: "Description",
Expand All @@ -220,7 +233,7 @@ func TestHandler_Http(t *testing.T) {
openapitest.WithOperation("get",
openapitest.UseResponseRef(http.StatusOK,
&openapi.ResponseRef{
Reference: dynamic.Reference{
Reference: dynamic.Reference[*openapi.ResponseRef]{
Ref: "#/components/pathItems/foo",
Description: "Description",
},
Expand Down
3 changes: 1 addition & 2 deletions api/handler_kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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 @@ -1098,7 +1097,7 @@ func TestHandler_Kafka_Metrics(t *testing.T) {
}

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

Expand Down
7 changes: 4 additions & 3 deletions api/handler_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/base64"
"encoding/json"
"mokapi/config/dynamic"
"mokapi/config/static"
"mokapi/providers/asyncapi3/asyncapi3test"
"mokapi/providers/openapi/openapitest"
Expand Down Expand Up @@ -540,7 +541,7 @@ func TestSchemaInfo_MarshalJSON(t *testing.T) {
},
{
name: "json schema only ref",
s: &schemaInfo{Schema: &jsonSchema.Schema{Ref: "foo/bar"}},
s: &schemaInfo{Schema: &jsonSchema.Schema{Reference: dynamic.Reference[*jsonSchema.Schema]{Ref: "foo/bar"}}},
test: func(t *testing.T, s string, err error) {
require.NoError(t, err)
require.Equal(t, `{"schema":{"$ref":"foo/bar"}}`, s)
Expand All @@ -549,8 +550,8 @@ func TestSchemaInfo_MarshalJSON(t *testing.T) {
{
name: "json schema ref and value",
s: &schemaInfo{Schema: &jsonSchema.Schema{
Ref: "foo/bar",
Type: jsonSchema.Types{"string"},
Reference: dynamic.Reference[*jsonSchema.Schema]{Ref: "foo/bar"},
Type: jsonSchema.Types{"string"},
}},
test: func(t *testing.T, s string, err error) {
require.NoError(t, err)
Expand Down
6 changes: 3 additions & 3 deletions api/handler_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"mokapi/config/dynamic"
"mokapi/config/dynamic/asyncApi/asyncapitest"
"mokapi/config/dynamic/dynamictest"
"mokapi/config/static"
"mokapi/engine/enginetest"
"mokapi/providers/asyncapi3/asyncapi3test"
"mokapi/providers/openapi/openapitest"
"mokapi/runtime"
"mokapi/runtime/search"
Expand Down Expand Up @@ -143,7 +143,7 @@ func TestHandler_SearchQuery(t *testing.T) {

h := openapitest.NewConfig("3.0", openapitest.WithInfo("foo", "", ""))
app.AddHttp(toConfig(h))
k := asyncapitest.NewConfig(asyncapitest.WithInfo("foo", "", ""))
k := asyncapi3test.NewConfig(asyncapi3test.WithInfo("foo", "", ""))
_, err := app.Kafka.Add(toConfig(k), enginetest.NewEngine())
require.NoError(t, err)

Expand Down Expand Up @@ -173,7 +173,7 @@ func TestHandler_SearchQuery(t *testing.T) {

h := openapitest.NewConfig("3.0", openapitest.WithInfo("foo", "", ""))
app.AddHttp(toConfig(h))
k := asyncapitest.NewConfig(asyncapitest.WithInfo("foo", "", ""))
k := asyncapi3test.NewConfig(asyncapi3test.WithInfo("foo", "", ""))
_, err := app.Kafka.Add(toConfig(k), enginetest.NewEngine())
require.NoError(t, err)

Expand Down
10 changes: 5 additions & 5 deletions config/dynamic/asyncApi/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type ServerTag struct {
}

type ServerRef struct {
Ref string
dynamic.Reference[*ServerRef]
Value *Server
}

Expand All @@ -79,7 +79,7 @@ type ServerBindings struct {
}

type ChannelRef struct {
Ref string
dynamic.Reference[*ChannelRef]
Value *Channel
}

Expand Down Expand Up @@ -109,7 +109,7 @@ type OperationBindings struct {
}

type MessageRef struct {
Ref string
dynamic.Reference[*MessageRef]
Value *Message
}

Expand Down Expand Up @@ -141,7 +141,7 @@ type Components struct {
}

type ParameterRef struct {
dynamic.Reference
dynamic.Reference[*ParameterRef]
Value *Parameter
}

Expand All @@ -152,7 +152,7 @@ type Parameter struct {
}

type MessageTraitRef struct {
dynamic.Reference
dynamic.Reference[*MessageTraitRef]
Value *MessageTrait
}

Expand Down
87 changes: 37 additions & 50 deletions config/dynamic/asyncApi/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,21 @@ func convertChannels(cfg *asyncapi3.Config, channels map[string]*ChannelRef) err
if orig == nil {
continue
}
if len(orig.Ref) > 0 {
cfg.Channels[name] = &asyncapi3.ChannelRef{Reference: dynamic.Reference{Ref: orig.Ref}}
ch, err := convertChannel(name, orig, cfg)
if err != nil {
return err
}
if orig.Value != nil {
ch, err := convertChannel(name, orig, cfg)
if err != nil {
return err
}
if ch.Value != nil {
ch.Value.Config = cfg
cfg.Channels[name] = ch
}
cfg.Channels[name] = ch
}

return nil
}

func convertChannel(name string, c *ChannelRef, config *asyncapi3.Config) (*asyncapi3.ChannelRef, error) {
result := &asyncapi3.ChannelRef{Reference: dynamic.Reference{Ref: c.Ref}}
result := &asyncapi3.ChannelRef{Reference: dynamic.Reference[*asyncapi3.ChannelRef]{Ref: c.Ref}}

if c.Value != nil {
target := &asyncapi3.Channel{
Expand All @@ -98,7 +95,7 @@ func convertChannel(name string, c *ChannelRef, config *asyncapi3.Config) (*asyn
for _, server := range c.Value.Servers {
target.Servers = append(
target.Servers,
&asyncapi3.ServerRef{Reference: dynamic.Reference{
&asyncapi3.ServerRef{Reference: dynamic.Reference[*asyncapi3.ServerRef]{
Ref: fmt.Sprintf("#/servers/%s", server),
}})
}
Expand Down Expand Up @@ -192,53 +189,50 @@ func convertMessage(msg *MessageRef) *asyncapi3.MessageRef {
return nil
}

target := &asyncapi3.MessageRef{Reference: dynamic.Reference{Ref: msg.Ref}}
target := &asyncapi3.MessageRef{Reference: dynamic.Reference[*asyncapi3.MessageRef]{Ref: msg.Ref}}
if msg.Value != nil {
target.Value = &asyncapi3.Message{
Title: msg.Value.Title,
Name: msg.Value.Name,
Summary: msg.Value.Summary,
Description: msg.Value.Description,
ContentType: msg.Value.ContentType,
Payload: nil,
Payload: msg.Value.Payload,
Bindings: convertMessageBinding(msg.Value.Bindings),
Headers: msg.Value.Headers,
ExternalDocs: nil,
}

if msg.Value.Payload != nil && msg.Value.Payload.Value != nil {
target.Value.Payload = msg.Value.Payload
}
if msg.Value.Headers != nil && msg.Value.Headers.Value != nil {
target.Value.Headers = msg.Value.Headers
}
for _, orig := range msg.Value.Traits {
trait := &asyncapi3.MessageTraitRef{}
if len(orig.Ref) > 0 {
trait.Reference = dynamic.Reference{Ref: trait.Ref}
}
if orig.Value != nil {
trait.Value = convertMessageTrait(orig.Value).Value
trait := convertMessageTrait(orig)
if trait != nil {
target.Value.Traits = append(target.Value.Traits, trait)
}
target.Value.Traits = append(target.Value.Traits, trait)
}
}
return target
}

func convertMessageTrait(trait *MessageTrait) *asyncapi3.MessageTraitRef {
target := &asyncapi3.MessageTrait{
Name: trait.Name,
Title: trait.Title,
Summary: trait.Summary,
Description: trait.Description,
ContentType: trait.ContentType,
Bindings: convertMessageBinding(trait.Bindings),
func convertMessageTrait(trait *MessageTraitRef) *asyncapi3.MessageTraitRef {
target := &asyncapi3.MessageTraitRef{
Reference: dynamic.Reference[*asyncapi3.MessageTraitRef]{Ref: trait.Ref},
}

if trait.Headers != nil && trait.Headers.Value != nil {
target.Headers = trait.Headers
if trait.Value != nil {
target.Value = &asyncapi3.MessageTrait{
Name: trait.Value.Name,
Title: trait.Value.Title,
Summary: trait.Value.Summary,
Description: trait.Value.Description,
ContentType: trait.Value.ContentType,
Bindings: convertMessageBinding(trait.Value.Bindings),
}
if trait.Value.Headers != nil && trait.Value.Headers.Value != nil {
target.Value.Headers = trait.Value.Headers
}
}
return &asyncapi3.MessageTraitRef{Value: target}

return target
}

func convertParameters(channel *asyncapi3.Channel, params map[string]*ParameterRef) error {
Expand All @@ -251,7 +245,7 @@ func convertParameters(channel *asyncapi3.Channel, params map[string]*ParameterR

for name, orig := range params {
if len(orig.Ref) > 0 {
channel.Parameters[name] = &asyncapi3.ParameterRef{Reference: dynamic.Reference{Ref: orig.Ref}}
channel.Parameters[name] = &asyncapi3.ParameterRef{Reference: dynamic.Reference[*asyncapi3.ParameterRef]{Ref: orig.Ref}}
}
if orig.Value != nil {
p, err := convertParameter(name, orig.Value)
Expand Down Expand Up @@ -308,17 +302,15 @@ func convertServers(cfg *asyncapi3.Config, servers map[string]*ServerRef) {
}

for name, orig := range servers {
if len(orig.Ref) > 0 {
cfg.Servers.Set(name, &asyncapi3.ServerRef{Reference: dynamic.Reference{Ref: orig.Ref}})
}
if orig.Value != nil {
cfg.Servers.Set(name, convertServer(orig))
if orig == nil {
continue
}
cfg.Servers.Set(name, convertServer(orig))
}
}

func convertServer(ref *ServerRef) *asyncapi3.ServerRef {
result := &asyncapi3.ServerRef{Reference: dynamic.Reference{Ref: ref.Ref}}
result := &asyncapi3.ServerRef{Reference: dynamic.Reference[*asyncapi3.ServerRef]{Ref: ref.Ref}}

if ref.Value != nil {
target := &asyncapi3.Server{
Expand Down Expand Up @@ -440,7 +432,7 @@ func convertComponents(c *Components, config *asyncapi3.Config) (*asyncapi3.Comp
target.Parameters = map[string]*asyncapi3.ParameterRef{}
}
if len(orig.Ref) > 0 {
target.Parameters[name] = &asyncapi3.ParameterRef{Reference: dynamic.Reference{Ref: orig.Ref}}
target.Parameters[name] = &asyncapi3.ParameterRef{Reference: dynamic.Reference[*asyncapi3.ParameterRef]{Ref: orig.Ref}}
}
if orig.Value != nil {
p, err := convertParameter(name, orig.Value)
Expand All @@ -455,12 +447,7 @@ func convertComponents(c *Components, config *asyncapi3.Config) (*asyncapi3.Comp
if target.MessageTraits == nil {
target.MessageTraits = map[string]*asyncapi3.MessageTraitRef{}
}
if len(orig.Ref) > 0 {
target.MessageTraits[name] = &asyncapi3.MessageTraitRef{Reference: dynamic.Reference{Ref: orig.Ref}}
}
if orig.Value != nil {
target.MessageTraits[name] = convertMessageTrait(orig.Value)
}
target.MessageTraits[name] = convertMessageTrait(orig)
}

return target, nil
Expand Down
Loading
Loading