fix bugs of pvc api

This commit is contained in:
zhangmin
2020-05-13 15:56:13 +08:00
parent f34a4e1c2a
commit 250dd4b065
9 changed files with 506 additions and 38 deletions

View File

@@ -70,6 +70,15 @@ func AddToContainer(c *restful.Container, informerFactory informers.InformerFact
Param(webservice.QueryParameter(query.ParameterOrderBy, "sort parameters, e.g. orderBy=createTime")).
Returns(http.StatusOK, ok, api.ListResult{}))
webservice.Route(webservice.GET("/namespaces/{namespace}/{resources}/{name}").
To(handler.handleGetResources).
Metadata(restfulspec.KeyOpenAPITags, []string{tagNamespacedResource}).
Doc("Namespace level get resource query").
Param(webservice.PathParameter("namespace", "the name of the project")).
Param(webservice.PathParameter("resources", "namespace level resource type, e.g. pods,jobs,configmaps,services.")).
Param(webservice.PathParameter("name", "the name of resource")).
Returns(http.StatusOK, ok, api.ListResult{}))
webservice.Route(webservice.GET("/components").
To(handler.handleGetComponents).
Metadata(restfulspec.KeyOpenAPITags, []string{tagComponentStatus}).