Problems with base_path
otobrglez opened this issue · comments
Oto Brglez commented
Hey guys!
So. If I have configuration like following one:
Swagger::Docs::Config.register_apis('1.0' => {
controller_base_path: '',
api_extension_type: '',
api_file_path: 'public/',
base_path: '/', # <- THIS
clean_directory: true,
attributes: { }
})
This gets converted to json
like this:
{
"apiVersion": "1.0",
"swaggerVersion": "1.2",
"basePath": "",
"apis": [
{
"path": "/questions.{format}",
"description": "Questions"
}
],
"authorizations": null,
}
See the basePath
in JSON. It should be /
and not empty string. Or am I wrong? Any ideas?
Cheers and thanks for your effort!
Chab commented
This is confusing me too. The readme says base_path defaults to '/' (https://github.com/richhollis/swagger-docs#configuration-options). Is it the expected behavior?
Btw, thanks for the great work!
Kurt Werle commented
Yup, this is broken. base_path should almost certainly be '/' by default - it is not. What's more, setting it to be '/' does not work. Nor does '//', nor '/'.