flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

Hide models from the buttom of the swagger ui

Open michaelbukachi opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. I'm just re-raising this issue from the previous repo

Describe the solution you'd like I already opened a PR on the previous repo. I'd like to do the same here.

Describe alternatives you've considered I haven't found any alternative solutions.

michaelbukachi avatar Mar 25 '20 14:03 michaelbukachi

The correct link to the PR seems to be: https://github.com/noirbizarre/flask-restplus/pull/644

But IMHO, this improvement is related to #16

ziirish avatar Mar 25 '20 14:03 ziirish

I see. Is there a discussion currently ongoing on gitter Or it's temporarily on hold?

michaelbukachi avatar Mar 25 '20 14:03 michaelbukachi

It's not on hold, we just didn't have the opportunity to dig this topic yet.

If you have materials to start the discussion, then feel free to do so (preferably in #16 so we can eventually gather multiple feedbacks at the same place).

Thanks

ziirish avatar Mar 25 '20 14:03 ziirish

It would be especially excellent if the models associated with an explicitly hidden resource were also hidden automatically. Unfortunately this is not the case. If you use models in @api.expect or @api.response for a route for which you have set @api.route('/test', doc=False), those models still show up at the bottom.

In a use case where different documentation must be distributed to different audiences, endpoints can be easily hidden programmatically but hiding models is a tedious manual task.

AFlowOfCode avatar Oct 25 '23 22:10 AFlowOfCode