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

Per-app routers #14

Open
knipknap opened this issue Apr 2, 2017 · 1 comment
Open

Per-app routers #14

knipknap opened this issue Apr 2, 2017 · 1 comment
Labels

Comments

@knipknap
Copy link

knipknap commented Apr 2, 2017

Thanks for creating this important missing piece of Swagger to Django mapping!
It would be great if per-app schemas were supported. Ideally, you could use OpenAPI tags to map views into apps like so:

swagger.yaml

tags:
- name: feature1
  description: Manage feature 1
- name: app1
  description: Features provided by app1
- name: app2
  description: Features provided by app2
paths:
  /upload/:
    post:
      tags:
      - app1
      - feature1
   ...

Then your Django project folder layout could look something like:

app1/urls.py:

from . import api
router = SwaggerRouter(tags='app1', views=api)
...

or maybe even

router = SwaggerRouter(schema='app1/swagger.yaml', tags='app1', views=api)
@projob projob added the inbox label Apr 2, 2017
@0181532686cf4a31163be0bf3e6bb6732bf
Copy link
Contributor

You are welcome! I will implement this in future releases. Stay tuned!

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

No branches or pull requests

3 participants