mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-25 04:40:21 +00:00
docs(openapi): add drf-spectacular
and default settings
This commit is contained in:
parent
6775022635
commit
4bc132d82c
2 changed files with 12 additions and 0 deletions
|
@ -99,6 +99,7 @@ INSTALLED_APPS = (
|
||||||
"corsheaders",
|
"corsheaders",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
"cachalot",
|
"cachalot",
|
||||||
|
'drf_spectacular',
|
||||||
) + CUSTOM_APPS
|
) + CUSTOM_APPS
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,6 +117,7 @@ REST_FRAMEWORK = {
|
||||||
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
|
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
|
||||||
"PAGE_SIZE": 20,
|
"PAGE_SIZE": 20,
|
||||||
"PAGINATE_BY": 20,
|
"PAGINATE_BY": 20,
|
||||||
|
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,3 +138,12 @@ TEMPLATES = [
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
||||||
|
|
||||||
|
SPECTACULAR_SETTINGS = {
|
||||||
|
'TITLE': 'Your Project API',
|
||||||
|
'DESCRIPTION': 'Your project description',
|
||||||
|
'VERSION': '1.0.0',
|
||||||
|
'SERVE_INCLUDE_SCHEMA': False,
|
||||||
|
# OTHER SETTINGS
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,4 @@ mimeparse==0.1.3
|
||||||
psycopg2-binary==2.9.9
|
psycopg2-binary==2.9.9
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
python-mimeparse==1.6.0
|
python-mimeparse==1.6.0
|
||||||
|
drf-spectacular==0.27.1
|
||||||
|
|
Loading…
Reference in a new issue