Skip to content

Commit 7aad217

Browse files
authored
Merge pull request #368 from APIParkLab/feature/liujian-1.9
update service publish config
2 parents 2a951c2 + 8fba191 commit 7aad217

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

module/publish/iml.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -603,21 +603,22 @@ func (i *imlPublishModule) Publish(ctx context.Context, serviceId string, id str
603603
if err != nil {
604604
return err
605605
}
606-
if info.EnableMCP {
607-
err = i.updateMCPServer(ctx, serviceId, info.Name, flow.Version)
608-
if err != nil {
609-
return err
610-
}
611-
}
612-
apidocCommit, err := i.apiDocService.LatestDocCommit(ctx, serviceId)
606+
607+
apiDocCommit, err := i.apiDocService.LatestDocCommit(ctx, serviceId)
613608
if err != nil {
614609
return err
615610
}
616611
isReleased := true
617612
i.serviceOverviewService.Update(ctx, serviceId, &service_overview.Update{
618-
ReleaseApiCount: &apidocCommit.Data.APICount,
613+
ReleaseApiCount: &apiDocCommit.Data.APICount,
619614
IsReleased: &isReleased,
620615
})
616+
if info.EnableMCP {
617+
err = mcp_server.SetServerByOpenapi(serviceId, info.Name, flow.Version, apiDocCommit.Data.Content)
618+
if err != nil {
619+
return err
620+
}
621+
}
621622
}
622623
return i.publishService.SetStatus(ctx, serviceId, id, status)
623624
})

0 commit comments

Comments
 (0)