refactor(api): move Swagger UI to docs route
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user