Skip to content

Commit 5c37901

Browse files
committed
fix(docs): use relative URLs for API documentation requests
1 parent f0d459d commit 5c37901

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

docs/docs.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ const docTemplate = `{
479479
"database.ValueHashWithTimestamp": {
480480
"type": "object",
481481
"properties": {
482+
"proof": {
483+
"type": "string"
484+
},
482485
"slot": {
483486
"type": "integer"
484487
},
@@ -513,7 +516,7 @@ const docTemplate = `{
513516
// SwaggerInfo holds exported Swagger Info so clients can modify it
514517
var SwaggerInfo = &swag.Spec{
515518
Version: "1.0.0",
516-
Host: "localhost:8080",
519+
Host: "",
517520
BasePath: "/",
518521
Schemes: []string{"http", "https"},
519522
Title: "Merkle Oracle Node API",

docs/swagger.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
},
1414
"version": "1.0.0"
1515
},
16-
"host": "localhost:8080",
1716
"basePath": "/",
1817
"paths": {
1918
"/healthcheck": {
@@ -476,6 +475,9 @@
476475
"database.ValueHashWithTimestamp": {
477476
"type": "object",
478477
"properties": {
478+
"proof": {
479+
"type": "string"
480+
},
479481
"slot": {
480482
"type": "integer"
481483
},

docs/swagger.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ definitions:
3232
type: object
3333
database.ValueHashWithTimestamp:
3434
properties:
35+
proof:
36+
type: string
3537
slot:
3638
type: integer
3739
timestamp:
@@ -41,7 +43,6 @@ definitions:
4143
type: integer
4244
type: array
4345
type: object
44-
host: localhost:8080
4546
info:
4647
contact: {}
4748
license:

internal/api/api.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
// @version 1.0.0
2222
// @license.name Apache 2.0
2323
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
24-
// @host localhost:8080
2524
// @BasePath /
2625
// @tag.name objects
2726
// @tag.description Object Queries
@@ -45,12 +44,6 @@ func generateScalarDocs() {
4544
scalargo.WithTitle("Merkle Oracle Node API"),
4645
),
4746
scalargo.WithLayout(scalargo.LayoutClassic),
48-
scalargo.WithServers(
49-
scalargo.Server{
50-
URL: "https://merkle-oracle.zengate-dev.com",
51-
Description: "Staging Server",
52-
},
53-
),
5447
)
5548

5649
if err != nil {

0 commit comments

Comments
 (0)