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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ead0621efd74558a93b5f0785c91b3470b18adfeb25826222f73b54a2615cbd |
|
MD5 | a3aaf7bda2b46e2728d1fd39c2fbb63d |
|
BLAKE2b-256 | 7627502eda3fb8a60226ac05b56d1b003911024208133735981a3abdd476948a |
Close
Hashes for drf_spectacular_jsonapi-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dceece0f4fc1ba9ca181d0604980357e3e572eab7035223e650cd4832a127e3e |
|
MD5 | 455ea9579d8d2697a7a17f147f29e9e4 |
|
BLAKE2b-256 | 5c9bb93b2dca4ce558f0063d5d982af4a47344790e41729d10d8eddb167742ec |