refactor(api): move Swagger UI to docs route

This commit is contained in:
2026-09-21 19:12:51 +03:30
parent 9328556c28
commit 099ec2150e
3 changed files with 13 additions and 8 deletions

View File

@@ -26,16 +26,21 @@ func TestRegisterDocumentation(t *testing.T) {
},
{
name: "Swagger UI",
path: "/swagger/",
path: "/docs/",
wantStatus: http.StatusOK,
wantContentType: "text/html; charset=utf-8",
wantBody: `url: "/openapi.json"`,
},
{
name: "documentation shortcut",
name: "documentation trailing slash",
path: "/docs",
wantStatus: http.StatusTemporaryRedirect,
wantLocation: "/swagger/",
wantLocation: "/docs/",
},
{
name: "removed Swagger route",
path: "/swagger/",
wantStatus: http.StatusNotFound,
},
}