Skip to main content

open api 3 schema generator for drf-json-api package based on drf-spectacular package.

Project description

open api 3 schema generator for drf-json-api package based on drf-spectacular package.

Tested with various dependency version

Tested for versions in combination:

python

django

drf-spectacular

3.10

4.0

0.25.x

3.11

4.1

0.26.x

3.12

4.2

0.27.x

3.13

5.0

0.28.x

3.14

5.1

0.29.x

5.2

6.0

Installation

Install using pip

$ pip install drf-spectacular-jsonapi

then configure the rest framework and drf-spectacular with the following settings inside your project settings.py

REST_FRAMEWORK = {
    # YOUR SETTINGS
    "DEFAULT_SCHEMA_CLASS": "drf_spectacular_jsonapi.schemas.openapi.JsonApiAutoSchema",
    "DEFAULT_PAGINATION_CLASS": "drf_spectacular_jsonapi.schemas.pagination.JsonApiPageNumberPagination",
}
SPECTACULAR_SETTINGS = {
    # To provide different schema components for patch and post
    "COMPONENT_SPLIT_REQUEST": True
    # to fix path parameter names for nested routes https://chibisov.github.io/drf-extensions/docs/#nested-routes
    "PREPROCESSING_HOOKS": [
        "drf_spectacular_jsonapi.hooks.fix_nested_path_parameters"
    ],
}

Release management

Same as the based drf-spectacular package, we provide versions below sem version 1.x.x to signal that every new version may potentially break you.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_spectacular_jsonapi-0.6.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drf_spectacular_jsonapi-0.6.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file drf_spectacular_jsonapi-0.6.0.tar.gz.

File metadata

  • Download URL: drf_spectacular_jsonapi-0.6.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for drf_spectacular_jsonapi-0.6.0.tar.gz
Algorithm Hash digest
SHA256 ccd0eccc14bafb2c036c57be6851fa282147b8e1cf8a258f467895c0cf5a3f81
MD5 97b6193b8311abafde6c2309d7610314
BLAKE2b-256 f0dc69dfd69bdc3a1326ee156e0f831878eb23f95bda3fd43216daf83f107e26

See more details on using hashes here.

File details

Details for the file drf_spectacular_jsonapi-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_spectacular_jsonapi-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cac3b1188a9fa8172abc7ef8966fcfd351e89ad23d2f33a251b415c68c870ce3
MD5 738ff699ba44eebe92fc4b2f1e71557d
BLAKE2b-256 2512476a92a793f1783dae5bbed00c9e9e2d434b4f33f8afd77a3f90c084b862

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page