--- id: drf-spectacular-jsonapi version: "0.6.0" license: BSD license_treatment: permissive maintenance: active --- # drf-spectacular-jsonapi — open api 3 schema generator for drf-json-api package based on drf-spectacular package. License: permissive · Maintenance: active · Downloads: 94.9K/mo ## What it is and what it does This package bridges drf-spectacular (a popular OpenAPI schema generator for Django REST Framework) and djangorestframework-jsonapi (which implements the JSON:API specification). It generates OpenAPI 3 schemas that correctly represent JSON:API-compliant endpoints, handling JSON:API-specific conventions like sparse fieldsets, includes, and filtering that standard schema generators don't understand. You install it alongside your existing Django REST Framework setup, configure it as the schema class in your REST_FRAMEWORK settings, and it automatically generates accurate OpenAPI documentation for your JSON:API endpoints. It includes hooks for handling nested routes from drf-extensions and can split request schemas for PATCH and POST operations. The package is in alpha (pre-1.0) and signals that breaking changes may occur in minor version bumps. Use it for: - Generate interactive OpenAPI documentation (Swagger/ReDoc) for JSON:API endpoints without manual schema annotation. - Integrate JSON:API services with API client generators that consume OpenAPI specs. - Document nested resource routes created with drf-extensions in a way that reflects their JSON:API structure. - Split request/response schemas for PATCH and POST operations to show different required fields per HTTP method. - Validate that your JSON:API implementation conforms to the spec by inspecting the generated schema. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates OpenAPI 3 schemas for Django REST Framework APIs that use the JSON:API specification, extending drf-spectacular to handle JSON:API-specific conventions. Yes, if you are already using djangorestframework-jsonapi and drf-spectacular together. It solves a real gap—standard schema generators don't understand JSON:API semantics—and has low install friction. The alpha status and small community (14 stars) mean you should expect occasional breaking changes and limited third-party troubleshooting resources, but the package is actively maintained and has no known vulnerabilities. ## Install pip install drf-spectacular-jsonapi uv add drf-spectacular-jsonapi poetry add drf-spectacular-jsonapi ## Installing drf-spectacular-jsonapi Before you install: Low friction install with a pure-Python wheel. Actively maintained as of May 2026 with recent releases. Depends on five runtime packages (Django, drf-spectacular, drf-extensions, djangorestframework, djangorestframework-jsonapi) that you must already have configured; the documentation explicitly requires installing those first. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely as long as you include the license notice. Quickstart: pip install drf-spectacular-jsonapi # In settings.py: REST_FRAMEWORK = { "DEFAULT_SCHEMA_CLASS": "drf_spectacular_jsonapi.schemas.openapi.JsonApiAutoSchema", } SPECTACULAR_SETTINGS = { "COMPONENT_SPLIT_REQUEST": True, } Requires Django, djangorestframework, djangorestframework-jsonapi, and drf-spectacular to be installed and configured first. Verify before relying: - Whether the package works correctly with Django 5.2 and 6.0 (listed in test matrix but without explicit Python/drf-spectacular versions) - Current state of the 14 GitHub stars and whether the package has active community adoption beyond download counts ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 94.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openapi schema generator json api, drf-spectacular json api, django rest framework json api docs, openapi 3 json api schema, rest framework schema generation, api documentation json api, openapi-schema, json-api, django-rest-framework [View on SkillFed](https://skillfed.io/packages/drf-spectacular-jsonapi) · [View on PyPI](https://pypi.org/project/drf-spectacular-jsonapi/)