Flask-restplus: any way to sort the namespaces in swagger?
I am probably way too late but I have been wondering the same thing but with flask_restx so posting this to hopefully help others. But it seems to go by the order in which your namespaces are imported.
For example:
from rest.endpoints.Episodes import ns as episodes_namespacefrom rest.endpoints.Plex import ns as plex_namespacefrom rest.endpoints.Server import ns as server_namespace
Will be ordered in swagger as:
- Episodes
- Plex
- Server
While:
from rest.endpoints.Server import ns as server_namespacefrom rest.endpoints.Episodes import ns as episodes_namespacefrom rest.endpoints.Plex import ns as plex_namespace
Will be ordered in swagger as:
- Server
- Episodes
- Plex