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
2 changes: 1 addition & 1 deletion _examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ diff:
git diff --color --ignore-all-space --ignore-blank-lines --exit-code .

swagger:
echo "http://localhost:8088"
@echo "Swagger UI is available at http://localhost:8088"
docker run -p 8088:8080 -v $$(pwd):/docs -e SWAGGER_JSON=/docs/openapi.gen.yaml swaggerapi/swagger-ui
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:
tags: ["ExampleService"]
summary: "Deprecated."
deprecated: true
requestBody:
Expand Down Expand Up @@ -541,6 +542,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetUser:
post:
tags: ["ExampleService"]
summary: "Deprecated: Use GetUserV2 instead."
deprecated: true
security:
Expand Down Expand Up @@ -583,6 +585,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetUserV2:
post:
tags: ["ExampleService"]
summary: "GetUserV2 returns user based on given userID."
security:
- JWT: []
Expand Down Expand Up @@ -626,6 +629,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/FindUser:
post:
tags: ["ExampleService"]
summary: "FindUser searches for a user using the given search filter."
security:
- JWT: []
Expand Down Expand Up @@ -672,6 +676,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/ListUsers:
post:
tags: ["ExampleService"]
summary: "ListUsers returns all users."
security:
- JWT: []
Expand Down Expand Up @@ -713,6 +718,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetComplex:
post:
tags: ["ExampleService"]
summary: ""
requestBody:
content:
Expand Down Expand Up @@ -752,6 +758,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/ExampleService/GetAllOptional:
post:
tags: ["ExampleService"]
summary: ""
requestBody:
content:
Expand Down Expand Up @@ -791,6 +798,7 @@ paths:
- $ref: '#/components/schemas/ErrorDatabaseDown'
/rpc/AdminService/ListUsers:
post:
tags: ["AdminService"]
summary: ""
security:
- JWT: []
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:
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 }}
deprecated: true
Expand Down