Skip to content

Commit 61a4fe8

Browse files
xdefragclaude
andcommitted
fix: correct Swagger basePath to prevent double /api/v1 prefix
The basePath was /api/v1 while route annotations already included the full /api/v1/* paths, causing Swagger UI to send requests to /api/v1/api/v1/stats which fell through to the HTML catch-all handler. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8186fb8 commit 61a4fe8

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/lore/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @title Lore API
22
// @version 1.0
33
// @description REST API for the Lore Stellar blockchain token explorer. Provides access to MTLAP (Persons), MTLAC (Companies), and MTLAX (Synthetic) accounts, relationships, reputation scores, and statistics.
4-
// @BasePath /api/v1
4+
// @BasePath /
55

66
package main
77

internal/api/docs/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ const docTemplate = `{
667667
var SwaggerInfo = &swag.Spec{
668668
Version: "1.0",
669669
Host: "",
670-
BasePath: "/api/v1",
670+
BasePath: "/",
671671
Schemes: []string{},
672672
Title: "Lore API",
673673
Description: "REST API for the Lore Stellar blockchain token explorer. Provides access to MTLAP (Persons), MTLAC (Companies), and MTLAX (Synthetic) accounts, relationships, reputation scores, and statistics.",

internal/api/docs/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"contact": {},
77
"version": "1.0"
88
},
9-
"basePath": "/api/v1",
9+
"basePath": "/",
1010
"paths": {
1111
"/api/v1/accounts": {
1212
"get": {

internal/api/docs/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
basePath: /api/v1
1+
basePath: /
22
definitions:
33
api.AccountDetailResponse:
44
properties:

0 commit comments

Comments
 (0)