Skip to content

Commit 430d2ed

Browse files
committed
use dash as separator between service and method name
1 parent 2c8857e commit 430d2ed

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

_examples/openapi.gen.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ components:
501501
paths:
502502
/rpc/ExampleService/Ping:
503503
post:
504-
operationId: ExampleServicePing
504+
operationId: ExampleService-Ping
505505
tags: ["ExampleService"]
506506
summary: "Deprecated."
507507
deprecated: true
@@ -543,7 +543,7 @@ paths:
543543
- $ref: '#/components/schemas/ErrorDatabaseDown'
544544
/rpc/ExampleService/GetUser:
545545
post:
546-
operationId: ExampleServiceGetUser
546+
operationId: ExampleService-GetUser
547547
tags: ["ExampleService"]
548548
summary: "Deprecated: Use GetUserV2 instead."
549549
deprecated: true
@@ -587,7 +587,7 @@ paths:
587587
- $ref: '#/components/schemas/ErrorDatabaseDown'
588588
/rpc/ExampleService/GetUserV2:
589589
post:
590-
operationId: ExampleServiceGetUserV2
590+
operationId: ExampleService-GetUserV2
591591
tags: ["ExampleService"]
592592
summary: "GetUserV2 returns user based on given userID."
593593
security:
@@ -632,7 +632,7 @@ paths:
632632
- $ref: '#/components/schemas/ErrorDatabaseDown'
633633
/rpc/ExampleService/FindUser:
634634
post:
635-
operationId: ExampleServiceFindUser
635+
operationId: ExampleService-FindUser
636636
tags: ["ExampleService"]
637637
summary: "FindUser searches for a user using the given search filter."
638638
security:
@@ -680,7 +680,7 @@ paths:
680680
- $ref: '#/components/schemas/ErrorDatabaseDown'
681681
/rpc/ExampleService/ListUsers:
682682
post:
683-
operationId: ExampleServiceListUsers
683+
operationId: ExampleService-ListUsers
684684
tags: ["ExampleService"]
685685
summary: "ListUsers returns all users."
686686
security:
@@ -723,7 +723,7 @@ paths:
723723
- $ref: '#/components/schemas/ErrorDatabaseDown'
724724
/rpc/ExampleService/GetComplex:
725725
post:
726-
operationId: ExampleServiceGetComplex
726+
operationId: ExampleService-GetComplex
727727
tags: ["ExampleService"]
728728
summary: ""
729729
requestBody:
@@ -764,7 +764,7 @@ paths:
764764
- $ref: '#/components/schemas/ErrorDatabaseDown'
765765
/rpc/ExampleService/GetAllOptional:
766766
post:
767-
operationId: ExampleServiceGetAllOptional
767+
operationId: ExampleService-GetAllOptional
768768
tags: ["ExampleService"]
769769
summary: ""
770770
requestBody:
@@ -805,7 +805,7 @@ paths:
805805
- $ref: '#/components/schemas/ErrorDatabaseDown'
806806
/rpc/AdminService/ListUsers:
807807
post:
808-
operationId: AdminServiceListUsers
808+
operationId: AdminService-ListUsers
809809
tags: ["AdminService"]
810810
summary: ""
811811
security:

main.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ paths:
134134
{{- $deprecated := index $method.Annotations "deprecated" }}
135135
/rpc/{{$service.Name}}/{{$method.Name}}:
136136
post:
137-
operationId: {{$service.Name}}{{$method.Name}}
137+
operationId: {{$service.Name}}-{{$method.Name}}
138138
tags: ["{{$service.Name}}"]
139139
summary: {{ if $deprecated }}{{ if $deprecated.Value }}{{printf "%q" (print "Deprecated: " $deprecated.Value)}}{{else}}"Deprecated."{{end}}{{else if gt (len $method.Comments) 0}}{{printf "%q" (index $method.Comments 0)}}{{else}}""{{end}}
140140
{{- if $deprecated }}

0 commit comments

Comments
 (0)