[API] Remove unused path parameters (#131)

Remove unused path parameters in `GET /api/v1/vaas/{chain_id}/{emitter}/{seq}`
This commit is contained in:
agodnic 2023-02-03 15:44:46 -03:00 committed by GitHub
parent 7506ff0bf5
commit 38c8e82879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 44 deletions

View File

@ -1111,7 +1111,7 @@ const docTemplate = `{
}
}
},
"/api/v1/vaas/{chain_id}/{emitter}/{seq}/{signer}/{hash}": {
"/api/v1/vaas/{chain_id}/{emitter}/{seq}": {
"get": {
"description": "Find a VAA by ID.",
"tags": [
@ -1140,20 +1140,6 @@ const docTemplate = `{
"in": "path",
"required": true
},
{
"type": "string",
"description": "Signer address",
"name": "signer",
"in": "path",
"required": true
},
{
"type": "string",
"description": "VAA hash",
"name": "hash",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "include the parsed contents of the VAA, if available",

View File

@ -1104,7 +1104,7 @@
}
}
},
"/api/v1/vaas/{chain_id}/{emitter}/{seq}/{signer}/{hash}": {
"/api/v1/vaas/{chain_id}/{emitter}/{seq}": {
"get": {
"description": "Find a VAA by ID.",
"tags": [
@ -1133,20 +1133,6 @@
"in": "path",
"required": true
},
{
"type": "string",
"description": "Signer address",
"name": "signer",
"in": "path",
"required": true
},
{
"type": "string",
"description": "VAA hash",
"name": "hash",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "include the parsed contents of the VAA, if available",

View File

@ -1305,7 +1305,7 @@ paths:
description: Internal Server Error
tags:
- Wormscan
/api/v1/vaas/{chain_id}/{emitter}/{seq}/{signer}/{hash}:
/api/v1/vaas/{chain_id}/{emitter}/{seq}:
get:
description: Find a VAA by ID.
operationId: find-vaa-by-id
@ -1325,16 +1325,6 @@ paths:
name: seq
required: true
type: integer
- description: Signer address
in: path
name: signer
required: true
type: string
- description: VAA hash
in: path
name: hash
required: true
type: string
- description: include the parsed contents of the VAA, if available
in: query
name: parsedPayload

View File

@ -126,13 +126,11 @@ func (c *Controller) FindByEmitter(ctx *fiber.Ctx) error {
// @Param chain_id path integer true "id of the blockchain"
// @Param emitter path string true "address of the emitter"
// @Param seq path integer true "sequence of the VAA"
// @Param signer path string true "Signer address"
// @Param hash path string true "VAA hash"
// @Param parsedPayload query bool false "include the parsed contents of the VAA, if available"
// @Success 200 {object} response.Response[[]vaa.VaaWithPayload]
// @Failure 400
// @Failure 500
// @Router /api/v1/vaas/{chain_id}/{emitter}/{seq}/{signer}/{hash} [get]
// @Router /api/v1/vaas/{chain_id}/{emitter}/{seq} [get]
func (c *Controller) FindById(ctx *fiber.Ctx) error {
chainID, emitter, seq, err := middleware.ExtractVAAParams(ctx, c.logger)