Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
oe-explorer
Advanced tools
This is a fork of loopback-component-explorer version 4.2.0. We've basically removed some dependencies and make changes so that it supports oe-cloud project
Browse and test your oeCloud.io app's APIs.
Below is a simple LoopBack application. The explorer is mounted at /explorer
.
var loopback = require('loopback');
var app = loopback();
var explorer = require('../');
var port = 3000;
var Product = loopback.Model.extend('product');
Product.attachTo(loopback.memory());
app.model(Product);
app.use('/api', loopback.rest());
// Register explorer using component-centric API:
explorer(app, { basePath: '/api', mountPath: '/explorer' });
// Alternatively, register as a middleware:
app.use('/explorer', explorer.routes(app, { basePath: '/api' }));
console.log("Explorer mounted at localhost:" + port + "/explorer");
app.listen(port);
Options are passed to explorer(app, options)
.
basePath
: String
Default:
app.get('restAPIRoot')
or'/api'
.
Sets the API's base path. This must be set if you are mounting your api to a path different than '/api', e.g. with `loopback.use('/custom-api-root', loopback.rest());
mountPath
: String
Default:
/explorer
Set the path where to mount the explorer component.
protocol
: String
Default:
null
A hard override for the outgoing protocol (
http
orhttps
) that is designated in Swagger resource documents. By default,loopback-component-explorer
will write the protocol that was used to retrieve the doc. This option is useful if, for instance, your API sits behind an SSL terminator and thus needs to report its endpoints ashttps
, even though incoming traffic is auto-detected ashttp
.
uiDirs
: Array of Strings
Sets a list of paths within your application for overriding Swagger UI files.
If present, will search
uiDirs
first when attempting to load Swagger UI, allowing you to pick and choose overrides to the interface. Use this to style your explorer or add additional functionality.
See index.html, where you may want to begin your overrides. The rest of the UI is provided by Swagger UI.
apiInfo
: Object
Additional information about your API. See the spec.
resourcePath
: String
Default:
'resources'
Sets a different path for the resource listing. You generally shouldn't have to change this.
version
: String
Default: Read from package.json
Sets your API version. If not present, will read from your app's package.json.
FAQs
Browse and test your LoopBack app's APIs
We found that oe-explorer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.