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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d33a5e7cfd1fb04fadfc8f1beb5d8d0dc941f72e1a4f690c9bbf64a090811af |
|
MD5 | 3049f04cf5a095557726d0bdbf21acf0 |
|
BLAKE2b-256 | dc52c5e553c786a6817912c95421d95e3b02f4a77cf17201f0ed91dc210bd9c6 |
Close
Hashes for drf_spectacular_jsonapi-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e455fedf51c4ccd91278a91099c86091dac83a69e65990fccc31bdfdd9c13602 |
|
MD5 | 83ffea0ebc88cf7cca7936fcdf73cff5 |
|
BLAKE2b-256 | c685456eed642bb333273c71ef4c1de0954dfc234b85217fa88808809c0989b9 |