From 587dbe723bf80f5c96ab1d49aa92c4c2311a8bef Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 10 Aug 2022 17:58:32 +0800 Subject: [PATCH] Fix the tiny typo in ks-openapi-spec (#5114) There is tiny typo in Create Namespace API. So fix it quickly. --- api/ks-openapi-spec/swagger.json | 2 +- pkg/kapis/tenant/v1alpha2/register.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/ks-openapi-spec/swagger.json b/api/ks-openapi-spec/swagger.json index fd9e0f3ae..0b8b7b844 100644 --- a/api/ks-openapi-spec/swagger.json +++ b/api/ks-openapi-spec/swagger.json @@ -12711,7 +12711,7 @@ "tags": [ "Namespace" ], - "summary": "List the namespaces of the specified workspace for the current user", + "summary": "Create the namespaces of the specified workspace for the current user", "operationId": "CreateNamespace", "parameters": [ { diff --git a/pkg/kapis/tenant/v1alpha2/register.go b/pkg/kapis/tenant/v1alpha2/register.go index 6eaa70f17..cb9fcd471 100644 --- a/pkg/kapis/tenant/v1alpha2/register.go +++ b/pkg/kapis/tenant/v1alpha2/register.go @@ -190,7 +190,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8s ws.Route(ws.POST("/workspaces/{workspace}/namespaces"). To(handler.CreateNamespace). Param(ws.PathParameter("workspace", "workspace name")). - Doc("List the namespaces of the specified workspace for the current user"). + Doc("Create the namespaces of the specified workspace for the current user"). Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceTag}))