noirbizarre / flask-restplus

Fully featured framework for fast, easy and documented API development with Flask
http://flask-restplus.readthedocs.org
Other
2.73k stars 507 forks source link

How to create subnamespace for swagger documentation? #469

Open LLCcom opened 6 years ago

LLCcom commented 6 years ago

The problem is that within a single namespace there might be many api endpoints making the list too long to read. Move part of them into another namespace is OK. But in swagger documentation it becomes a peer rather then a nested folded subnamespace. I want to preserve the hierarchical order for example:

in original swagger documentation: person:    -------[get]person/pid    -------[get]person/device    -------[post]person/device    --------...... many other endpoints

I wish I could make it clearer and preserve the hierarchical structure like this: person:    -------[get]person/pid    -------device:          -------[post]person/device          -------[get]person/device    --------...... many other endpoints

martijnarts commented 6 years ago

I don't think this is possible with Swagger/Swagger UI?

LLCcom commented 6 years ago

@TotempaaltJ That is what I think too, but I am not sure. Is there a way to verify that?

martijnarts commented 6 years ago

You can ask at Swagger UI maybe. This isn't a Restplus issue either way (feature request at most 😄).