Closed johanasterholm closed 2 years ago
Hi @johanasterholm ! Thanks very much for your PR. I am happy with your code, but I just want to check, did you try and see if you can not rather use the swagger ui properties to do this (setting defaultModelsExpandDepth
to -1
) That would still require some code changes here, but then at least it use the built in way rather than css. Let me know
see https://stackoverflow.com/questions/57138564/how-to-hide-the-models-section-in-swagger-ui
Hi @phillip-kruger , No I did not try this. Let me try that and I will get back to you
This is possible as well: Should I delete this pull request and create a new one? Here is how the code looks like with that change: https://github.com/microprofile-extensions/openapi-ext/compare/main...johanasterholm:models_optional
I think that is better. W.d.y.t ?
I agree. I have updated this pull request
Thanks, I'll have a look later and merge and release
This change adds the possibility to hide the models section on the swagger UI. This is done by introducing a new property openapi.ui.modelsVisibility which defaults to visible. Setting this to hidden will hide the section in the UI.