[API] Fix incorrect route in swagger docs (#165)
The API's swagger documentation exposes a route `GET /api/v1/governor/max_available/:chain`, but instead it should be `GET /api/v1/governor/notional/max_available/:chain`.
This commit is contained in:
parent
33440225a7
commit
3e01b42f20
|
@ -249,53 +249,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/governor/max_available/:chain": {
|
|
||||||
"get": {
|
|
||||||
"description": "Returns the maximum amount of notional value available for a given blockchain.",
|
|
||||||
"tags": [
|
|
||||||
"Wormscan"
|
|
||||||
],
|
|
||||||
"operationId": "governor-max-notional-available-by-chain",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "Page number.",
|
|
||||||
"name": "page",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "Number of elements per page.",
|
|
||||||
"name": "pageSize",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"ASC",
|
|
||||||
"DESC"
|
|
||||||
],
|
|
||||||
"type": "string",
|
|
||||||
"description": "Sort results in ascending or descending order.",
|
|
||||||
"name": "sortOrder",
|
|
||||||
"in": "query"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.Response-governor_MaxNotionalAvailableRecord"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Bad Request"
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/governor/notional/available": {
|
"/api/v1/governor/notional/available": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns the amount of notional value available for each blockchain.",
|
"description": "Returns the amount of notional value available for each blockchain.",
|
||||||
|
@ -484,6 +437,53 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/governor/notional/max_available/:chain": {
|
||||||
|
"get": {
|
||||||
|
"description": "Returns the maximum amount of notional value available for a given blockchain.",
|
||||||
|
"tags": [
|
||||||
|
"Wormscan"
|
||||||
|
],
|
||||||
|
"operationId": "governor-max-notional-available-by-chain",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Page number.",
|
||||||
|
"name": "page",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Number of elements per page.",
|
||||||
|
"name": "pageSize",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enum": [
|
||||||
|
"ASC",
|
||||||
|
"DESC"
|
||||||
|
],
|
||||||
|
"type": "string",
|
||||||
|
"description": "Sort results in ascending or descending order.",
|
||||||
|
"name": "sortOrder",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.Response-governor_MaxNotionalAvailableRecord"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/governor/status": {
|
"/api/v1/governor/status": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns the governor status for all guardians.",
|
"description": "Returns the governor status for all guardians.",
|
||||||
|
|
|
@ -242,53 +242,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/governor/max_available/:chain": {
|
|
||||||
"get": {
|
|
||||||
"description": "Returns the maximum amount of notional value available for a given blockchain.",
|
|
||||||
"tags": [
|
|
||||||
"Wormscan"
|
|
||||||
],
|
|
||||||
"operationId": "governor-max-notional-available-by-chain",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "Page number.",
|
|
||||||
"name": "page",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "Number of elements per page.",
|
|
||||||
"name": "pageSize",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"ASC",
|
|
||||||
"DESC"
|
|
||||||
],
|
|
||||||
"type": "string",
|
|
||||||
"description": "Sort results in ascending or descending order.",
|
|
||||||
"name": "sortOrder",
|
|
||||||
"in": "query"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/response.Response-governor_MaxNotionalAvailableRecord"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Bad Request"
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/governor/notional/available": {
|
"/api/v1/governor/notional/available": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns the amount of notional value available for each blockchain.",
|
"description": "Returns the amount of notional value available for each blockchain.",
|
||||||
|
@ -477,6 +430,53 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/governor/notional/max_available/:chain": {
|
||||||
|
"get": {
|
||||||
|
"description": "Returns the maximum amount of notional value available for a given blockchain.",
|
||||||
|
"tags": [
|
||||||
|
"Wormscan"
|
||||||
|
],
|
||||||
|
"operationId": "governor-max-notional-available-by-chain",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Page number.",
|
||||||
|
"name": "page",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Number of elements per page.",
|
||||||
|
"name": "pageSize",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enum": [
|
||||||
|
"ASC",
|
||||||
|
"DESC"
|
||||||
|
],
|
||||||
|
"type": "string",
|
||||||
|
"description": "Sort results in ascending or descending order.",
|
||||||
|
"name": "sortOrder",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/response.Response-governor_MaxNotionalAvailableRecord"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/governor/status": {
|
"/api/v1/governor/status": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns the governor status for all guardians.",
|
"description": "Returns the governor status for all guardians.",
|
||||||
|
|
|
@ -728,38 +728,6 @@ paths:
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
tags:
|
tags:
|
||||||
- Wormscan
|
- Wormscan
|
||||||
/api/v1/governor/max_available/:chain:
|
|
||||||
get:
|
|
||||||
description: Returns the maximum amount of notional value available for a given
|
|
||||||
blockchain.
|
|
||||||
operationId: governor-max-notional-available-by-chain
|
|
||||||
parameters:
|
|
||||||
- description: Page number.
|
|
||||||
in: query
|
|
||||||
name: page
|
|
||||||
type: integer
|
|
||||||
- description: Number of elements per page.
|
|
||||||
in: query
|
|
||||||
name: pageSize
|
|
||||||
type: integer
|
|
||||||
- description: Sort results in ascending or descending order.
|
|
||||||
enum:
|
|
||||||
- ASC
|
|
||||||
- DESC
|
|
||||||
in: query
|
|
||||||
name: sortOrder
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/response.Response-governor_MaxNotionalAvailableRecord'
|
|
||||||
"400":
|
|
||||||
description: Bad Request
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
tags:
|
|
||||||
- Wormscan
|
|
||||||
/api/v1/governor/notional/available:
|
/api/v1/governor/notional/available:
|
||||||
get:
|
get:
|
||||||
description: Returns the amount of notional value available for each blockchain.
|
description: Returns the amount of notional value available for each blockchain.
|
||||||
|
@ -884,6 +852,38 @@ paths:
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
tags:
|
tags:
|
||||||
- Wormscan
|
- Wormscan
|
||||||
|
/api/v1/governor/notional/max_available/:chain:
|
||||||
|
get:
|
||||||
|
description: Returns the maximum amount of notional value available for a given
|
||||||
|
blockchain.
|
||||||
|
operationId: governor-max-notional-available-by-chain
|
||||||
|
parameters:
|
||||||
|
- description: Page number.
|
||||||
|
in: query
|
||||||
|
name: page
|
||||||
|
type: integer
|
||||||
|
- description: Number of elements per page.
|
||||||
|
in: query
|
||||||
|
name: pageSize
|
||||||
|
type: integer
|
||||||
|
- description: Sort results in ascending or descending order.
|
||||||
|
enum:
|
||||||
|
- ASC
|
||||||
|
- DESC
|
||||||
|
in: query
|
||||||
|
name: sortOrder
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/response.Response-governor_MaxNotionalAvailableRecord'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
tags:
|
||||||
|
- Wormscan
|
||||||
/api/v1/governor/status:
|
/api/v1/governor/status:
|
||||||
get:
|
get:
|
||||||
description: Returns the governor status for all guardians.
|
description: Returns the governor status for all guardians.
|
||||||
|
|
|
@ -283,7 +283,7 @@ func (c *Controller) GetAvailableNotionalByChainID(ctx *fiber.Ctx) error {
|
||||||
// @Success 200 {object} response.Response[MaxNotionalAvailableRecord]
|
// @Success 200 {object} response.Response[MaxNotionalAvailableRecord]
|
||||||
// @Failure 400
|
// @Failure 400
|
||||||
// @Failure 500
|
// @Failure 500
|
||||||
// @Router /api/v1/governor/max_available/:chain [get]
|
// @Router /api/v1/governor/notional/max_available/:chain [get]
|
||||||
func (c *Controller) GetMaxNotionalAvailableByChainID(ctx *fiber.Ctx) error {
|
func (c *Controller) GetMaxNotionalAvailableByChainID(ctx *fiber.Ctx) error {
|
||||||
|
|
||||||
p, err := middleware.ExtractPagination(ctx)
|
p, err := middleware.ExtractPagination(ctx)
|
||||||
|
|
Loading…
Reference in New Issue