fix api doc basepath (#423)

fix api doc basepath

Co-authored-by: Hernan Gips <hernangips@OnoSendai.local>
This commit is contained in:
gipsh 2023-06-18 13:17:22 -03:00 committed by GitHub
parent 3f823c51ac
commit b490be0f5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 137 deletions

View File

@ -1,4 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
@ -574,19 +574,12 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"status": {
"type": "string"
}
}
"type": "object",
"properties": {
"status": {
"type": "string"
}
]
}
}
},
"400": {
@ -899,19 +892,12 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"ready": {
"type": "string"
}
}
"type": "object",
"properties": {
"ready": {
"type": "string"
}
]
}
}
},
"400": {
@ -1625,22 +1611,15 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
]
}
}
},
"400": {
@ -1686,22 +1665,15 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
]
}
}
},
"400": {
@ -1752,6 +1724,9 @@ const docTemplate = `{
"id": {
"type": "string"
},
"originAddress": {
"type": "string"
},
"originChain": {
"$ref": "#/definitions/vaa.ChainID"
},
@ -2782,12 +2757,14 @@ const docTemplate = `{
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/v1",
BasePath: "/",
Schemes: []string{},
Title: "Wormhole Guardian API",
Description: "Wormhole Guardian API\nThis is the API for the Wormhole Guardian and Explorer.\nThe API has two namespaces: wormscan and guardian.\nwormscan is the namespace for the explorer and the new endpoints. The prefix is /api/v1.\nguardian is the legacy namespace backguard compatible with guardian node API. The prefix is /v1.\nThis API is public and does not require authentication although some endpoints are rate limited.\nCheck each endpoint documentation for more information.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {

View File

@ -15,7 +15,7 @@
},
"version": "1.0"
},
"basePath": "/v1",
"basePath": "/",
"paths": {
"/api/v1/address/{address}": {
"get": {
@ -567,19 +567,12 @@
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"status": {
"type": "string"
}
}
"type": "object",
"properties": {
"status": {
"type": "string"
}
]
}
}
},
"400": {
@ -892,19 +885,12 @@
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"ready": {
"type": "string"
}
}
"type": "object",
"properties": {
"ready": {
"type": "string"
}
]
}
}
},
"400": {
@ -1618,22 +1604,15 @@
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
]
}
}
},
"400": {
@ -1679,22 +1658,15 @@
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
]
}
}
},
"400": {
@ -1745,6 +1717,9 @@
"id": {
"type": "string"
},
"originAddress": {
"type": "string"
},
"originChain": {
"$ref": "#/definitions/vaa.ChainID"
},

View File

@ -1,4 +1,4 @@
basePath: /v1
basePath: /
definitions:
address.AddressOverview:
properties:
@ -24,6 +24,8 @@ definitions:
$ref: '#/definitions/vaa.ChainID'
id:
type: string
originAddress:
type: string
originChain:
$ref: '#/definitions/vaa.ChainID'
status:
@ -1106,12 +1108,10 @@ paths:
"200":
description: OK
schema:
allOf:
- type: object
- properties:
status:
type: string
type: object
properties:
status:
type: string
type: object
"400":
description: Bad Request
"500":
@ -1323,12 +1323,10 @@ paths:
"200":
description: OK
schema:
allOf:
- type: object
- properties:
ready:
type: string
type: object
properties:
ready:
type: string
type: object
"400":
description: Bad Request
"500":
@ -1824,14 +1822,12 @@ paths:
"200":
description: OK
schema:
allOf:
- type: object
- properties:
vaaBytes:
items:
type: integer
type: array
type: object
properties:
vaaBytes:
items:
type: integer
type: array
type: object
"400":
description: Bad Request
"500":
@ -1862,14 +1858,12 @@ paths:
"200":
description: OK
schema:
allOf:
- type: object
- properties:
vaaBytes:
items:
type: integer
type: array
type: object
properties:
vaaBytes:
items:
type: integer
type: array
type: object
"400":
description: Bad Request
"500":

View File

@ -86,7 +86,7 @@ func GetSwagger(ctx *fiber.Ctx) error {
// @contact.email info@wormhole.com
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @BasePath /v1
// @BasePath /
func main() {
appCtx, cancel := context.WithCancel(context.Background())
defer cancel()