Skip to content

Swagger, swagger there you are

Well, djapy, one of the finest piece of software I've ever written, has a swagger documentation. It is flawless, it is perfect, it is beautiful.


Our swagger documentation supports dark mode. It's beautiful, it's perfect, it's flawless.

Here's how it looks like:

Djapy Swagger Support

And here's how you can use it:

from django.urls import path
from djapy import openapi

    title="Todo API",
    description="A simple todo API",
        {"name": "Todos", "description": "Operations related to todos"}

urlpatterns = [
    path('', openapi.urls),

And that's it. You can now access your swagger documentation at the url you've set in your file.

Tags and descriptions

You can add tags to whole endpoints in your using the TAGS variable.

TAGS = ["Todos"]

def todo_list(request):

Also, you can assign tags specifically using @djapigy decorator.

from djapy import djapify

def todo_list(request):

It's that simple.