Skip to content

Commit 332af9f

Browse files
committed
drf-spectacular configuration
1 parent 662f29d commit 332af9f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

server/balancer_backend/settings.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"corsheaders",
5252
"rest_framework",
5353
"djoser",
54+
'drf_spectacular',
5455
]
5556

5657
MIDDLEWARE = [
@@ -195,8 +196,15 @@
195196
"DEFAULT_AUTHENTICATION_CLASSES": (
196197
"rest_framework_simplejwt.authentication.JWTAuthentication",
197198
),
199+
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
198200
}
199201

202+
SPECTACULAR_SETTINGS = {
203+
'TITLE': 'Balancer API',
204+
'DESCRIPTION': 'API for the Balancer medication decision support tool',
205+
'VERSION': '1.0.0',
206+
'SERVE_INCLUDE_SCHEMA': False,
207+
}
200208

201209
SIMPLE_JWT = {
202210
"AUTH_HEADER_TYPES": ("JWT",),

server/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ sentence_transformers
1818
PyMuPDF==1.24.0
1919
Pillow
2020
pytesseract
21-
anthropic
21+
anthropic
22+
drf-spectacular

0 commit comments

Comments
 (0)