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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e605499c846d2e533b1dfc091e0728227ad3e8395ddb8511624f8ca30585dce |
|
MD5 | f4579af908217b536482806be52d5536 |
|
BLAKE2b-256 | a9792ea4b2bfa2a704fce6d9029c9a648218d421de7ac1a95d73165875cbaa7a |
Close
Hashes for drf_spectacular_jsonapi-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 550a4452254847231853c667f3c3e23cf7bbffb80ebac1aa5e761f5e24a6dd4b |
|
MD5 | d2c1de74bc3f2d968841c74213c1a9ca |
|
BLAKE2b-256 | b89bc57d9b3d261ee94a11e7626608c387372e828054b9f63f14c080c73ce513 |