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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for drf-spectacular-jsonapi-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e28448c028619fab3980b847239425ba168274cebf28ba60ec9ee7e14e681c4 |
|
MD5 | 061f83ef5264fbd04a6898fe46b30e74 |
|
BLAKE2b-256 | 23305b8d0aa3651a259e00611ffd69ea9050dbdc9ff2a7bb6ae17f2d78adc29a |
Close
Hashes for drf_spectacular_jsonapi-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a968d94c5f9b02a1325dd66c954c1460aebfbb0b219e984e7f8eb80933be2117 |
|
MD5 | 19635c08bcb022d1db01844f85d41083 |
|
BLAKE2b-256 | faf9722a714784eb5164a2db8aa073e18ef1d9e199e84a8911166b1fb9f64523 |