I have installed Loopback 4, and mounted my legacy Loopback 3 app into it as part of my migration - all good so far.
However my (swagger-ui shaped) explorer renders expanded by default - and there are a LOT of endpoints and services - making it very hard to find what I'm looking for.
My instinct tells me I should be able to add a configuration here in my application.ts - but I cannot find anything.
this.configure(RestExplorerBindings.COMPONENT).to({
path: '/explorer',
docExpansion:'none' <<<<< this is what I would expect/like
});
this.component(RestExplorerComponent);
Has anyone been able to accomplish this? It seems from the forums there are a lot of requests for something like this.
You could try this.
https://www.npmjs.com/package/@loopback/rest-explorer
Overriding the Swagger UI index.html For more flexibility, the
indexTemplatePathproperty can be used to allow full customization of Swagger UI configuration options.indexTemplatePathshould be an absolute path to a html.ejs template.To get started, download the default index.html.ejs, add
/explorer/index.html.ejsto your project, and update the configuration:you can then add
inside the index.html.ejs file.