# axnsan12/drf-yasg

Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

Repository: https://github.com/axnsan12/drf-yasg
Canonical: https://ross.abutalabs.com/products/drf-yasg
Homepage: https://drf-yasg.readthedocs.io/en/stable/
Language: Python
License: NOASSERTION
License Family: other
Topics: django-rest-swagger, django-rest-framework, django, swagger, swagger-codegen, swagger-ui, redoc, documentation-generator, coreapi, openapi, openapi-specification, rest, rest-api
Last push: 2026-08-26T19:24:27+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 72, longevity 100
- inputs: {"age_days": 3199, "days_push": 7, "days_rel": 190, "gap_med": 21.0, "n_releases_24m": 9}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3545, forks 442 (observed 2026-08-28T04:08:09.390361+00:00)

## What it is
drf-yasg is a Python library that automatically generates real Swagger/OpenAPI 2.0 specifications from Django REST Framework code. It bundles Swagger UI and ReDoc for interactive API documentation and supports nested serializers, codegen-compatible model definitions, and customization hooks.

## Use cases
- generate OpenAPI 2.0 schema from Django REST Framework API
- serve interactive Swagger UI docs for a DRF API
- document DRF endpoints with nested serializer schemas
- produce codegen-compatible model definitions from DRF code
- validate generated Swagger schema automatically
- export API spec in JSON or YAML

## When to choose
- your project is locked to OpenAPI/Swagger 2.0
- you need mature, battle-tested schema generation for an existing DRF codebase
- you want bundled Swagger UI and ReDoc out of the box

## When to avoid
- you need OpenAPI 3.0 or 3.1 support - use drf-spectacular instead
- you are starting a new DRF project and can pick a more actively developed alternative
- your API does not use Django REST Framework

## Facets
- artifact type: library
- maturity: maintenance
- function: api-documentation, documentation, serialization
- domain: web-development, apis, documentation, backend
- platform: python
- tags: django, django-rest-framework, openapi, swagger, swagger-ui, redoc, schema-generation

## Member repositories
- axnsan12/drf-yasg (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.390361+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:34:24.817775+00:00, confidence not recorded.
  - readme: https://github.com/axnsan12/drf-yasg (fetched 2026-08-28T04:08:09.390361+00:00, sha 307e91855438)
  - registry_pypi: https://pypi.org/pypi/drf-yasg/json (fetched 2026-08-29T09:28:55.406796+00:00, sha a0f3c2b8f7dd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
