Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions _examples/openapi.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ components:
paths:
/rpc/ExampleService/Ping:
post:
operationId: ExampleService-Ping
tags: ["ExampleService"]
summary: "Deprecated."
deprecated: true
Expand Down Expand Up @@ -542,6 +543,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetUser:
post:
operationId: ExampleService-GetUser
tags: ["ExampleService"]
summary: "Deprecated: Use GetUserV2 instead."
deprecated: true
Expand Down Expand Up @@ -585,6 +587,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetUserV2:
post:
operationId: ExampleService-GetUserV2
tags: ["ExampleService"]
summary: "GetUserV2 returns user based on given userID."
security:
Expand Down Expand Up @@ -629,6 +632,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/FindUser:
post:
operationId: ExampleService-FindUser
tags: ["ExampleService"]
summary: "FindUser searches for a user using the given search filter."
security:
Expand Down Expand Up @@ -676,6 +680,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/ListUsers:
post:
operationId: ExampleService-ListUsers
tags: ["ExampleService"]
summary: "ListUsers returns all users."
security:
Expand Down Expand Up @@ -718,6 +723,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetComplex:
post:
operationId: ExampleService-GetComplex
tags: ["ExampleService"]
summary: ""
requestBody:
Expand Down Expand Up @@ -758,6 +764,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetAllOptional:
post:
operationId: ExampleService-GetAllOptional
tags: ["ExampleService"]
summary: ""
requestBody:
Expand Down Expand Up @@ -798,6 +805,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/AdminService/ListUsers:
post:
operationId: AdminService-ListUsers
tags: ["AdminService"]
summary: ""
security:
Expand Down
1 change: 1 addition & 0 deletions main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ paths:
{{- $deprecated := index $method.Annotations "deprecated" }}
/rpc/{{$service.Name}}/{{$method.Name}}:
post:
operationId: {{$service.Name}}-{{$method.Name}}
tags: ["{{$service.Name}}"]
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}}
{{- if $deprecated }}
Expand Down