From 644315ace198159ccb0dacc31ebac906a8b1ff12 Mon Sep 17 00:00:00 2001 From: Amit Oren Date: Mon, 23 Dec 2024 19:15:50 +0200 Subject: [PATCH] fix: Change applicationset generate HTTP method to avoid route conflicts (#20758) * Change applicationset generate HTTP method to avoid route conflicts Signed-off-by: Amit Oren * Update server/applicationset/applicationset.proto Co-authored-by: Alexandre Gaudreault Signed-off-by: Amit Oren * Codegen Signed-off-by: Amit Oren --------- Signed-off-by: Amit Oren Signed-off-by: Amit Oren Co-authored-by: Alexandre Gaudreault --- assets/swagger.json | 33 ++++++++ .../applicationset/applicationset.pb.go | 84 +++++++++---------- .../applicationset/applicationset.pb.gw.go | 2 +- server/applicationset/applicationset.proto | 2 +- 4 files changed, 77 insertions(+), 44 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index db3072e5a7bc6..9436a6a6f4c08 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -1990,6 +1990,39 @@ } } }, + "/api/v1/applicationsets/generate": { + "post": { + "tags": [ + "ApplicationSetService" + ], + "summary": "Generate generates", + "operationId": "ApplicationSetService_Generate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/applicationsetApplicationSetGenerateRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/applicationsetApplicationSetGenerateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, "/api/v1/applicationsets/{name}": { "get": { "tags": [ diff --git a/pkg/apiclient/applicationset/applicationset.pb.go b/pkg/apiclient/applicationset/applicationset.pb.go index 874ed5663b7c9..1c261252244f9 100644 --- a/pkg/apiclient/applicationset/applicationset.pb.go +++ b/pkg/apiclient/applicationset/applicationset.pb.go @@ -499,49 +499,49 @@ func init() { } var fileDescriptor_eacb9df0ce5738fa = []byte{ - // 660 bytes of a gzipped FileDescriptorProto + // 665 bytes of a gzipped FileDescriptorProto 0x1f, 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 0xf4, 0xe3, 0xa8, 0x89, 0x1e, 0xdf, 0x38, 0xdd, 0x05, 0xc4, + 0x0b, 0x03, 0x88, 0xcc, 0x1b, 0xcf, 0x6e, 0x4d, 0x5f, 0x3b, 0xae, 0xfd, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0x05, 0x4d, 0x64, 0x24, 0x20, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apiclient/applicationset/applicationset.pb.gw.go b/pkg/apiclient/applicationset/applicationset.pb.gw.go index 349c5729bea94..5a85818bfb3eb 100644 --- a/pkg/apiclient/applicationset/applicationset.pb.gw.go +++ b/pkg/apiclient/applicationset/applicationset.pb.gw.go @@ -682,7 +682,7 @@ func RegisterApplicationSetServiceHandlerClient(ctx context.Context, mux *runtim var ( pattern_ApplicationSetService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applicationsets", "name"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_ApplicationSetService_Generate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ApplicationSetService_Generate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "applicationsets", "generate"}, "", runtime.AssumeColonVerbOpt(true))) pattern_ApplicationSetService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true))) diff --git a/server/applicationset/applicationset.proto b/server/applicationset/applicationset.proto index e2e4663e94e84..8d1cb74a764b0 100644 --- a/server/applicationset/applicationset.proto +++ b/server/applicationset/applicationset.proto @@ -74,7 +74,7 @@ service ApplicationSetService { // Generate generates rpc Generate (ApplicationSetGenerateRequest) returns (ApplicationSetGenerateResponse) { option (google.api.http) = { - post: "/api/v1/applicationsets" + post: "/api/v1/applicationsets/generate" body: "*" }; }