Package Exports
- @loopback/rest-explorer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@loopback/rest-explorer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@loopback/rest-explorer
This module contains a component adding a self-hosted REST API Explorer to LoopBack applications.
Installation
npm install --save @loopback/rest-explorerBasic use
The component should be loaded in the constructor of your custom Application
class. Applications scaffolded by recent versions of our lb4 CLI tool have the
self-hosted REST API Explorer pre-configured out of the box.
Start by importing the component class:
import {RestExplorerComponent} from '@loopback/rest-explorer';In the constructor, add the component to your application:
this.component(RestExplorerComponent);By default, API Explorer is mounted at /explorer. This path can be customized
via RestExplorer configuration as follows:
this.bind(RestExplorerBindings.CONFIG).to({
path: '/openapi/ui',
});NOTE: The Explorer UI's visual style is not customizable yet. Our recommended solution is to create a fork of this module, make any style changes in the fork and publish the modified module under a different name. The GitHub issue #2023 is requesting a configuration option for customizing the visual style, please up-vote the issue and/or join the discussion if you are interested in this feature.
Contributions
Tests
Run npm test from the root folder.
Contributors
See all contributors.
License
MIT