Closed chdanielmueller closed 8 years ago
@chdanielmueller thks for this PR! Can you give me a sample swagger file I can use for reproducing the issue and for testing?
Hi @wcandillon,
This example json should reproduce the error. The problem is the basePath parameter.
{
"info": {
"title": "Hello World",
"version": "1.0.0",
"description": "A sample API"
},
"host": "localhost:3000",
"basePath": "/",
"swagger": "2.0",
"paths": {
"/hello": {
"get": {
"description": "Returns the homepage",
"responses": {
"200": {
"description": "hello world"
}
}
}
}
}
}
@chdanielmueller Thank you so much for pointing out this issue. Shouldn't basePath
be normalized to have its trailing slash remove instead? While your PR seems to be fix "basePath": "/",
, it doesn't seem to work for "basePath": "/v1/",
for instance?
You are right... I changed the code to use a regex which removes trailing slashes.
closes #117