diff --git a/pkg/service/rest_server.go b/pkg/service/rest_server.go index d772cf31..75ed2879 100644 --- a/pkg/service/rest_server.go +++ b/pkg/service/rest_server.go @@ -76,6 +76,7 @@ func (p *restServer) initHttpRrouter() { p.router.POST("/api:protorpc/KclvmService.LintPath", p.handle_LintPath) p.router.POST("/api:protorpc/KclvmService.OverrideFile", p.handle_OverrideFile) p.router.POST("/api:protorpc/KclvmService.GetSchemaType", p.handle_GetSchemaType) + p.router.POST("/api:protorpc/KclvmService.GetSchemaTypeMapping", p.handle_GetSchemaTypeMapping) p.router.POST("/api:protorpc/KclvmService.ValidateCode", p.handle_ValidateCode) } @@ -170,6 +171,13 @@ func (p *restServer) handle_GetSchemaType(w http.ResponseWriter, r *http.Request }) } +func (p *restServer) handle_GetSchemaTypeMapping(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + args := new(gpyrpc.GetSchemaTypeMapping_Args) + p.handle(w, r, args, func() (proto.Message, error) { + return p.c.GetSchemaTypeMapping(args) + }) +} + func (p *restServer) handle_ValidateCode(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { args := new(gpyrpc.ValidateCode_Args) p.handle(w, r, args, func() (proto.Message, error) {