Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with base_path #139

Open
otobrglez opened this issue Jun 2, 2016 · 2 comments
Open

Problems with base_path #139

otobrglez opened this issue Jun 2, 2016 · 2 comments

Comments

@otobrglez
Copy link

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
Copy link

chab commented Jul 22, 2016

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!

@kwerle
Copy link

kwerle commented Aug 10, 2016

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 '/'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants