I have working on the swagger-ui
which use the swagger json
file like:
...
...
...
host: example.com
basePath: /
schemes:
- https
swagger: "2.0"
...
...
...
Is there any way to not show the schemes
on the web via swagger-ui
.
I have gone through the documentation for configuration, but couldn't find anything that I can use. I might be missing something.
Let me know if you have any idea.
My JS code snippet:
// above code for swagger-ui stuff
// snippet is just about conf
jQuery(document).ready(function () {
const swaggerUI = SwaggerUIBundle({
url: jQuery("#swagger-ui").data("source"),
dom_id: "#swagger-ui",
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis
],
plugins: [
],
layout: "BaseLayout",
defaultModelsExpandDepth: -1,
});
window.swaggerUI = swaggerUI;
});
What I want to hide:
defaultModelsExpandDepth: -1
is how you hide the "Schemas" section. You already have this option in your Swagger UI config. – WhangSchemes
dropdown still appears that's why I am confused. – Anapestversions
) – WhangdefaultModelsExpandDepth: -1
, I can see models are hide but notschemes
– Anapest