swagger-docs icon indicating copy to clipboard operation
swagger-docs copied to clipboard

Problems with base_path

Open otobrglez opened this issue 8 years ago • 2 comments

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!

otobrglez avatar Jun 02 '16 12:06 otobrglez