Forum Discussion

sgerrits's avatar
sgerrits
Frequent Visitor
5 years ago

swagger “No operations defined in spec!” after using Django namespaceversioning for api

I'm implementing Namespaceversioning for my application. Everything works fine, except swagger. I got following message (and no endpoints) on my swagger page:

"No operations defined in spec!"

The error occurs when I enable default_version. like this:

REST_FRAMEWORK = {
    ....
    "DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.NamespaceVersioning",
    "DEFAULT_VERSION": "v1",
}

Probably because the url of my endpoints do change. I can't find how to edit them or where to change this to work let swagger work again.

my swagger settings:

  • Hi sgerrits! please note that the Django framework is not SmartBear's project, so, it is better to refer related questions to their support directly. Thank you.