Is there a way to show the operation_id
in drf_spectacular
like it is shown in drf_yasg
? The docs don't show anything regarding this setting. The operation_id
is used in our code generators, so it is very practical to view it in the overview.
Yes this is possible, just not very findable. It is a setting in the Swagger UI, which is listed here.
'SWAGGER_UI_SETTINGS': {
'displayOperationId': True,
}
With this added to the SPECTACULAR_SETTINGS
, the operation_id shows up in the Swagger UI.