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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drf-spectacular-jsonapi-0.5.2.tar.gz.
File metadata
- Download URL: drf-spectacular-jsonapi-0.5.2.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5bb8f05ea985ec3751d095c4ec677876d2832fa06dfd5ea58bb1e8897e5af47
|
|
| MD5 |
c5db5de09590b00b3344070cee871e72
|
|
| BLAKE2b-256 |
ab486762d6e086c0bf2155293f646cec388bf51493412490968559bd7d8ecacc
|
File details
Details for the file drf_spectacular_jsonapi-0.5.2-py3-none-any.whl.
File metadata
- Download URL: drf_spectacular_jsonapi-0.5.2-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0351ced5e77df954c575010dcf79acc935cf37e45cae16e63151980b93cd806
|
|
| MD5 |
f916b351a84f4f9f5962127f12a72fc8
|
|
| BLAKE2b-256 |
54c02a634ff6644593541e8a8ff33cdf61ee8b11aa9f69be3c111adb15d3cc2d
|