Skip to content

Commit

Permalink
feat: add GET _/info on swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jan 12, 2023
1 parent 383b710 commit 9b7d549
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/api/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func HTTPModule(serviceInfo api.ServiceInfo) fx.Option {
})
}),
fx.Supply(serviceInfo),
fx.Provide(fx.Annotate(httpRouter, fx.ParamTags(``, `group:"connectorHandlers"`))),
fx.Provide(fx.Annotate(httpRouter, fx.ParamTags(``, ``, `group:"connectorHandlers"`))),
addConnector[dummypay.Config](dummypay.NewLoader()),
addConnector[modulr.Config](modulr.NewLoader()),
addConnector[stripe.Config](stripe.NewLoader()),
Expand Down
18 changes: 18 additions & 0 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ info:
version: "PAYMENTS_VERSION"

paths:
/_info:
get:
summary: Get server info
operationId: getServerInfo
responses:
200:
description: Server information
content:
application/json:
schema:
$ref: '#/components/schemas/ServerInfo'
/payments:
get:
summary: List payments
Expand Down Expand Up @@ -986,3 +997,10 @@ components:
description: The creation date of the more recent BalanceTransaction fetched from stripe for this account
noMoreHistory:
type: boolean
ServerInfo:
type: object
required:
- version
properties:
version:
type: string

0 comments on commit 9b7d549

Please sign in to comment.