open api 3 schema generator for drf-json-api package based on drf-spectacular package.
Reason this release was yanked:
wrong import path in apps.py
Project description
open api 3 schema generator for drf-json-api package based on drf-spectacular package.
Tested with various dependency version
python |
django |
drf-spectacular |
---|---|---|
3.8 |
4.0 |
0.25.x |
3.9 |
4.1 |
0.26.x |
3.10 |
4.2 |
0.27.x |
3.11 |
5.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
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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b0279b307ab3cdf4a4f9fd57381387eb6281a62838c20beb1273ec8a35b08f |
|
MD5 | 794e66219a75ba17bb2a5aa8ffddb927 |
|
BLAKE2b-256 | ec1446a9caf51d39714975e148f1e2f6ba3dcaabce84128fc3017b8849cdbf61 |
Close
Hashes for drf_spectacular_jsonapi-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e9d5cfc24b7219355ae39c6aa763497f4d5984de39279228dc73f6c66401df |
|
MD5 | 7ea0c7e7f5554ed9da91cffd0647de0e |
|
BLAKE2b-256 | bf26dd5a52f3910760952910c29b15c84956ffc4154fb537c2e5a0d8d0577722 |