Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3689f92

Browse files
committed
openapi as optional feature
1 parent ca0319d commit 3689f92

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

‎CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ any parts of the framework not mentioned in the documentation should generally b
1313
### Added
1414

1515
* Added support for serializing nested serializers as attribute json value introducing setting `JSON_API_SERIALIZE_NESTED_SERIALIZERS_AS_ATTRIBUTE`
16-
* Add support openapi schema and for `generateschema` management command.
16+
* Add optional support for [openapi](https://www.openapis.org/) schema generation. Enable with:
17+
```
18+
pip install djangorestframework-jsonapi['openapi']
19+
```
20+
1721

1822
### Fixed
1923

‎README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ From PyPI
106106
$ # for optional package integrations
107107
$ pip install djangorestframework-jsonapi['django-filter']
108108
$ pip install djangorestframework-jsonapi['django-polymorphic']
109+
$ pip install djangorestframework-jsonapi['openapi']
109110

110111

111112
From Source

‎docs/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ From PyPI
6565
# for optional package integrations
6666
pip install djangorestframework-jsonapi['django-filter']
6767
pip install djangorestframework-jsonapi['django-polymorphic']
68+
pip install djangorestframework-jsonapi['openapi']
6869

6970
From Source
7071

‎docs/usage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,8 @@ initializer:
986986
```python
987987
from rest_framework_json_api.schemas.openapi import AutoSchema
988988

989+
TODO: resolve this with upstream changes:
990+
989991
openapi_schema = {
990992
'info': {
991993
'version': '1.0',

‎setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def get_package_data(package):
9595
],
9696
extras_require={
9797
'django-polymorphic': ['django-polymorphic>=2.0'],
98-
'django-filter': ['django-filter>=2.0']
98+
'django-filter': ['django-filter>=2.0'],
99+
'openapi': ['pyyaml>=5.3', 'uritemplate>=3.0.1']
99100
},
100101
setup_requires=wheel,
101102
python_requires=">=3.5",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /