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