diff --git a/pkg/kapis/openpitrix/v1/register.go b/pkg/kapis/openpitrix/v1/register.go index 3aeb3d2ce79309afc058b0134e7d493d249cfe36..3d469caa5959d49d06de098f909c926eb59d95c5 100644 --- a/pkg/kapis/openpitrix/v1/register.go +++ b/pkg/kapis/openpitrix/v1/register.go @@ -72,6 +72,14 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DataFormat("limit=%d,page=%d"). DefaultValue("limit=10,page=1"))) + webservice.Route(webservice.GET("/namespaces/{namespace}/applications/{application}"). + To(handler.DescribeApplication). + Returns(http.StatusOK, api.StatusOK, openpitrix2.Application{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Doc("Describe the specified application of the namespace"). + Param(webservice.PathParameter("namespace", "the name of the project").Required(true)). + Param(webservice.PathParameter("application", "the id of the application").Required(true))) + webservice.Route(webservice.GET("/clusters/{cluster}/applications"). To(handler.ListApplications). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}).