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

Namespaces not added to swagger when namespace initiated with api in constructor #710

Open
jonathanronen opened this issue Sep 13, 2019 · 1 comment

Comments

@jonathanronen
Copy link

Namespace takes an api argument, i.e. ns1 = Namespace(api=api, ...). However, this is not enough to make sure the namespace is automatically documented in swagger.json`; for that to work, the namespace needs to be expclicitly added to the api, i.e.

api.add_namespace(ns1)

Wouldn't it make sense to do this automatically when Namespace is instantiated with an api argument?

jonathanronen added a commit to jonathanronen/flask-restplus that referenced this issue Sep 13, 2019
@j5awry
Copy link
Collaborator

j5awry commented Sep 14, 2019

There's definitely redundancy in relating APIs and Namespaces. While it seems like a small thing, a change in how this works could be fairly disruptive to current users, depending on implementation and messaging around the change. Will spread this around to other maintainers.

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

No branches or pull requests

2 participants