Skip to content

Per-app routers #14

Open
Open
@knipknap

Description

@knipknap

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions