mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2025-04-27 10:11:24 +08:00
Added schema documentation
This commit is contained in:
parent
1c56369044
commit
2d0e602ba1
14 changed files with 732 additions and 1 deletions
BIN
equipment_tracker/config/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
equipment_tracker/config/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
equipment_tracker/config/__pycache__/settings.cpython-311.pyc
Normal file
BIN
equipment_tracker/config/__pycache__/settings.cpython-311.pyc
Normal file
Binary file not shown.
BIN
equipment_tracker/config/__pycache__/urls.cpython-311.pyc
Normal file
BIN
equipment_tracker/config/__pycache__/urls.cpython-311.pyc
Normal file
Binary file not shown.
|
@ -66,6 +66,8 @@ INSTALLED_APPS = [
|
|||
'rest_framework_simplejwt',
|
||||
'djoser',
|
||||
'corsheaders',
|
||||
'drf_spectacular',
|
||||
'drf_spectacular_sidecar',
|
||||
'accounts'
|
||||
]
|
||||
|
||||
|
@ -125,6 +127,19 @@ REST_FRAMEWORK = {
|
|||
'user': '1440/min'
|
||||
|
||||
},
|
||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||
}
|
||||
|
||||
# DRF-Spectacular
|
||||
SPECTACULAR_SETTINGS = {
|
||||
'TITLE': 'CITC Equipment Tracker Backend',
|
||||
'DESCRIPTION': 'An IT Elective 4 Project',
|
||||
'VERSION': '1.0.0',
|
||||
'SERVE_INCLUDE_SCHEMA': False,
|
||||
'SWAGGER_UI_DIST': 'SIDECAR',
|
||||
'SWAGGER_UI_FAVICON_HREF': 'SIDECAR',
|
||||
'REDOC_DIST': 'SIDECAR',
|
||||
# OTHER SETTINGS
|
||||
}
|
||||
|
||||
WSGI_APPLICATION = 'config.wsgi.application'
|
||||
|
|
|
@ -16,8 +16,14 @@ Including another URLconf
|
|||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('api/v1/', include('api.urls'))
|
||||
path('api/v1/', include('api.urls')),
|
||||
path('schema/', SpectacularAPIView.as_view(), name='schema'),
|
||||
path('swagger/',
|
||||
SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
|
||||
path('redoc/',
|
||||
SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue