schema: name the two 'kind' enums so the OpenAPI build is warning-free again

Plan.kind (pack/subscription) collided with the lesson kind
(quiz/video); drf-spectacular named one KindEd8Enum and warned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 13:11:22 +03:30
parent 67cbe05609
commit 1803c76a8b

View File

@@ -588,6 +588,12 @@ SPECTACULAR_SETTINGS = {
],
'SERVE_INCLUDE_SCHEMA': False,
'COMPONENT_SPLIT_REQUEST': True,
# دو فیلدِ «kind» با دو مجموعه‌ی مقدار: نوعِ درس و نوعِ پلن (بسته/اشتراک، از ۲۰۲۶-۱۰-۰۲).
# بدونِ نامِ صریح، drf-spectacular یکی را «KindEd8Enum» می‌نامید و هشدار می‌داد.
'ENUM_NAME_OVERRIDES': {
'LessonKindEnum': [('quiz', 'quiz'), ('video', 'video')],
'PlanKindEnum': [('pack', 'pack'), ('subscription', 'subscription')],
},
'SWAGGER_UI_SETTINGS': {
'deepLinking': True,
'displayRequestDuration': True,