Skip to content

Commit 3d9f4c2

Browse files
Shaxinerohitlohar45
authored andcommitted
protoc-gen-openapiv2: Assign user-defined service name as method tag (grpc-ecosystem#5339)
* protoc-gen-openapiv2: Assign user-defined service name as method tag * Update BUILD.bazel * fix(protoc-gen-openapiv2): correct API client method reference in test
1 parent 6936370 commit 3d9f4c2

File tree

8 files changed

+6173
-6202
lines changed

8 files changed

+6173
-6202
lines changed

examples/internal/clients/abe/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ go_library(
66
name = "abe",
77
srcs = [
88
"api_a_bit_of_everything.go",
9-
"api_a_bit_of_everything_service.go",
109
"api_camel_case_service_name.go",
1110
"api_echo_rpc.go",
1211
"api_snake_enum_service.go",

examples/internal/clients/abe/api/swagger.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ paths:
4545
/v1/example/a_bit_of_everything:
4646
post:
4747
tags:
48-
- "ABitOfEverythingService"
48+
- "ABitOfEverything"
4949
operationId: "ABitOfEverythingService_CreateBody"
5050
parameters:
5151
- in: "body"
@@ -134,7 +134,7 @@ paths:
134134
/v1/example/a_bit_of_everything/params/get/nested_enum/{singleNested.ok}:
135135
get:
136136
tags:
137-
- "ABitOfEverythingService"
137+
- "ABitOfEverything"
138138
operationId: "ABitOfEverythingService_CheckNestedEnumGetQueryParams"
139139
parameters:
140140
- name: "singleNested.ok"
@@ -546,7 +546,7 @@ paths:
546546
/v1/example/a_bit_of_everything/params/get/{singleNested.name}:
547547
get:
548548
tags:
549-
- "ABitOfEverythingService"
549+
- "ABitOfEverything"
550550
operationId: "ABitOfEverythingService_CheckGetQueryParams"
551551
parameters:
552552
- name: "singleNested.name"
@@ -965,7 +965,7 @@ paths:
965965
/v1/example/a_bit_of_everything/params/post/{stringValue}:
966966
post:
967967
tags:
968-
- "ABitOfEverythingService"
968+
- "ABitOfEverything"
969969
operationId: "ABitOfEverythingService_CheckPostQueryParams"
970970
parameters:
971971
- name: "stringValue"
@@ -1802,7 +1802,7 @@ paths:
18021802
? /v1/example/a_bit_of_everything/{floatValue}/{doubleValue}/{int64Value}/separator/{uint64Value}/{int32Value}/{fixed64Value}/{fixed32Value}/{boolValue}/{stringValue}/{uint32Value}/{sfixed32Value}/{sfixed64Value}/{sint32Value}/{sint64Value}/{nonConventionalNameValue}/{enumValue}/{pathEnumValue}/{nestedPathEnumValue}/{enumValueAnnotation}
18031803
: post:
18041804
tags:
1805-
- "ABitOfEverythingService"
1805+
- "ABitOfEverything"
18061806
summary: "Create a new ABitOfEverything"
18071807
description: "This API creates a new ABitOfEverything"
18081808
operationId: "ABitOfEverythingService_Create"
@@ -2210,7 +2210,7 @@ paths:
22102210
/v1/example/a_bit_of_everything/{uuidName}:
22112211
head:
22122212
tags:
2213-
- "ABitOfEverythingService"
2213+
- "ABitOfEverything"
22142214
operationId: "ABitOfEverythingService_Exists"
22152215
parameters:
22162216
- name: "uuidName"
@@ -2618,7 +2618,7 @@ paths:
26182618
$ref: "#/definitions/rpcStatus"
26192619
put:
26202620
tags:
2621-
- "ABitOfEverythingService"
2621+
- "ABitOfEverything"
26222622
operationId: "ABitOfEverythingService_Update"
26232623
parameters:
26242624
- name: "uuidName"
@@ -2662,7 +2662,7 @@ paths:
26622662
$ref: "#/definitions/rpcStatus"
26632663
options:
26642664
tags:
2665-
- "ABitOfEverythingService"
2665+
- "ABitOfEverything"
26662666
operationId: "ABitOfEverythingService_CustomOptionsRequest"
26672667
parameters:
26682668
- name: "uuidName"
@@ -3071,7 +3071,7 @@ paths:
30713071
/v1/example/a_bit_of_everything/{uuidName}:custom:
30723072
post:
30733073
tags:
3074-
- "ABitOfEverythingService"
3074+
- "ABitOfEverything"
30753075
operationId: "ABitOfEverythingService_Custom"
30763076
parameters:
30773077
- name: "uuidName"
@@ -3497,7 +3497,7 @@ paths:
34973497
/v1/example/a_bit_of_everything/{uuidName}:custom:custom:
34983498
post:
34993499
tags:
3500-
- "ABitOfEverythingService"
3500+
- "ABitOfEverything"
35013501
operationId: "ABitOfEverythingService_DoubleColon"
35023502
parameters:
35033503
- name: "uuidName"
@@ -3923,7 +3923,7 @@ paths:
39233923
/v1/example/a_bit_of_everything/{uuid}:
39243924
get:
39253925
tags:
3926-
- "ABitOfEverythingService"
3926+
- "ABitOfEverything"
39273927
operationId: "ABitOfEverythingService_Lookup"
39283928
parameters:
39293929
- name: "uuid"
@@ -4002,7 +4002,7 @@ paths:
40024002
? /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}
40034003
: get:
40044004
tags:
4005-
- "ABitOfEverythingService"
4005+
- "ABitOfEverything"
40064006
operationId: "ABitOfEverythingService_GetRepeatedQuery"
40074007
parameters:
40084008
- name: "pathRepeatedFloatValue"
@@ -4196,7 +4196,7 @@ paths:
41964196
/v1/example/checkStatus:
41974197
get:
41984198
tags:
4199-
- "ABitOfEverythingService"
4199+
- "ABitOfEverything"
42004200
operationId: "ABitOfEverythingService_CheckStatus"
42014201
parameters: []
42024202
responses:
@@ -4228,7 +4228,7 @@ paths:
42284228
/v1/example/deep_path/{singleNested.name}:
42294229
post:
42304230
tags:
4231-
- "ABitOfEverythingService"
4231+
- "ABitOfEverything"
42324232
operationId: "ABitOfEverythingService_DeepPathEcho"
42334233
parameters:
42344234
- name: "singleNested.name"
@@ -4272,7 +4272,7 @@ paths:
42724272
/v1/example/oneofenum:
42734273
post:
42744274
tags:
4275-
- "ABitOfEverythingService"
4275+
- "ABitOfEverything"
42764276
operationId: "ABitOfEverythingService_PostOneofEnum"
42774277
parameters:
42784278
- in: "body"
@@ -4310,7 +4310,7 @@ paths:
43104310
/v1/example/requiredmessagetype:
43114311
post:
43124312
tags:
4313-
- "ABitOfEverythingService"
4313+
- "ABitOfEverything"
43144314
operationId: "ABitOfEverythingService_PostRequiredMessageType"
43154315
parameters:
43164316
- in: "body"
@@ -4404,7 +4404,7 @@ paths:
44044404
/v1/{book.name}:
44054405
patch:
44064406
tags:
4407-
- "ABitOfEverythingService"
4407+
- "ABitOfEverything"
44084408
operationId: "ABitOfEverythingService_UpdateBook"
44094409
parameters:
44104410
- name: "book.name"
@@ -4460,7 +4460,7 @@ paths:
44604460
/v1/{parent}/books:
44614461
post:
44624462
tags:
4463-
- "ABitOfEverythingService"
4463+
- "ABitOfEverything"
44644464
summary: "Create a book."
44654465
operationId: "ABitOfEverythingService_CreateBook"
44664466
parameters:
@@ -4516,7 +4516,7 @@ paths:
45164516
/v2/example/a_bit_of_everything/{uuidName}:
45174517
put:
45184518
tags:
4519-
- "ABitOfEverythingService"
4519+
- "ABitOfEverything"
45204520
operationId: "ABitOfEverythingService_UpdateV2"
45214521
parameters:
45224522
- name: "uuidName"
@@ -4569,7 +4569,7 @@ paths:
45694569
$ref: "#/definitions/rpcStatus"
45704570
patch:
45714571
tags:
4572-
- "ABitOfEverythingService"
4572+
- "ABitOfEverything"
45734573
operationId: "ABitOfEverythingService_UpdateV22"
45744574
parameters:
45754575
- name: "uuidName"
@@ -4747,7 +4747,7 @@ paths:
47474747
/v2/example/errorwithdetails:
47484748
get:
47494749
tags:
4750-
- "ABitOfEverythingService"
4750+
- "ABitOfEverything"
47514751
operationId: "ABitOfEverythingService_ErrorWithDetails"
47524752
parameters: []
47534753
responses:
@@ -4853,7 +4853,7 @@ paths:
48534853
/v2/example/postwithemptybody/{name}:
48544854
post:
48554855
tags:
4856-
- "ABitOfEverythingService"
4856+
- "ABitOfEverything"
48574857
operationId: "ABitOfEverythingService_PostWithEmptyBody"
48584858
parameters:
48594859
- name: "name"
@@ -4896,7 +4896,7 @@ paths:
48964896
/v2/example/timeout:
48974897
get:
48984898
tags:
4899-
- "ABitOfEverythingService"
4899+
- "ABitOfEverything"
49004900
operationId: "ABitOfEverythingService_Timeout"
49014901
parameters: []
49024902
responses:
@@ -4928,7 +4928,7 @@ paths:
49284928
/v2/example/withbody/{id}:
49294929
post:
49304930
tags:
4931-
- "ABitOfEverythingService"
4931+
- "ABitOfEverything"
49324932
operationId: "ABitOfEverythingService_GetMessageWithBody"
49334933
parameters:
49344934
- name: "id"
@@ -4971,7 +4971,7 @@ paths:
49714971
/v2/{value}:check:
49724972
get:
49734973
tags:
4974-
- "ABitOfEverythingService"
4974+
- "ABitOfEverything"
49754975
operationId: "ABitOfEverythingService_CheckExternalPathEnum"
49764976
parameters:
49774977
- name: "value"
@@ -5011,7 +5011,7 @@ paths:
50115011
/v2a/example/a_bit_of_everything/{uuidName}:
50125012
patch:
50135013
tags:
5014-
- "ABitOfEverythingService"
5014+
- "ABitOfEverything"
50155015
operationId: "ABitOfEverythingService_UpdateV23"
50165016
parameters:
50175017
- name: "uuidName"
@@ -5056,7 +5056,7 @@ paths:
50565056
/v3/{value}:check:
50575057
get:
50585058
tags:
5059-
- "ABitOfEverythingService"
5059+
- "ABitOfEverything"
50605060
operationId: "ABitOfEverythingService_CheckExternalNestedPathEnum"
50615061
parameters:
50625062
- name: "value"

0 commit comments

Comments
 (0)