Skip to content

Commit

Permalink
Merge pull request #59 from Alschn/feature/websockets-docs
Browse files Browse the repository at this point in the history
Install drf-spectacular-websocket and add minimal websockets documentation
  • Loading branch information
Alschn authored Jun 7, 2024
2 parents d0f41d0 + 0d47f95 commit 6dcb258
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 96 deletions.
5 changes: 3 additions & 2 deletions backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ channels-redis = "==4.2.0"
redis = "==5.0.4"
django-q2 = "==1.6.2"
python-dotenv = "==1.0.1"
psycopg = {extras = ["binary"], version = "==3.1.18"}
psycopg = { extras = ["binary"], version = "==3.1.18" }
dj-database-url = "==2.1.0"
whitenoise = "==6.6.0"
daphne = "==4.1.2"
gunicorn = "==22.0.0"
openpyxl = "==3.1.2"
drf-spectacular = "==0.27.2"
drf-spectacular = { extras = ["sidecar"], version = "==0.27.2" }
django-storages = "==1.14.2"
boto3 = "==1.34.93"
django-countries = "==7.6.1"
drf-standardized-errors = "==0.13.0"
drf-spectacular-websocket = "==1.2.7"

[dev-packages]
coverage = "==7.5.0"
Expand Down
202 changes: 109 additions & 93 deletions backend/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions backend/core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
# social auth
'allauth.socialaccount.providers.google',
# open api schema
'drf_spectacular_websocket',
'drf_spectacular',
'drf_spectacular_sidecar',
# standardized errors
'drf_standardized_errors',
# apps
Expand Down Expand Up @@ -332,6 +334,11 @@
'ErrorCode429Enum': 'drf_standardized_errors.openapi_serializers.ErrorCode429Enum.choices',
'ErrorCode500Enum': 'drf_standardized_errors.openapi_serializers.ErrorCode500Enum.choices',
},

'SWAGGER_UI_SETTINGS': {
# https://github.com/Friskes/drf-spectacular-websocket?tab=readme-ov-file#configure-settings
'connectSocket': False,
}
}

# Static files (CSS, JavaScript, Images)
Expand Down
Loading

0 comments on commit 6dcb258

Please sign in to comment.