Registry / web-framework / loopback-component-explorer

loopback-component-explorer

JSON →
library6.5.1jsnpmunverified

loopback-component-explorer is a utility for LoopBack 3 applications, providing an interactive UI to browse and test API endpoints. It is currently at version 6.5.1 and is intrinsically linked to LoopBack 3, which is in "Maintenance LTS mode." This means the component itself receives only critical bug fixes and security patches, with no new feature development. Its primary function is to render the API specification using an embedded `swagger-ui` (version 2.x), enabling developers to visualize and interact with their API routes directly within the browser. Its release cadence is sporadic, tied to critical fixes for the EOL LoopBack 3 framework. A key differentiator is its seamless integration into the LoopBack 3 ecosystem, acting as the standard API documentation and testing tool for that framework generation. Users are strongly encouraged to migrate to LoopBack 4, which uses a different explorer component.

npm install loopback-component-explorer
INSTALL
IMPORT
SIG · LOOPBACK-COMPONENT
L
loopback-component-explorer
web-frameworkjavascriptv6.5.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

explorer
const explorer = require('loopback-component-explorer');
Primarily used in CommonJS environments with LoopBack 3, the `explorer` variable then becomes a function to register the component.
routes
explorer.routes(app, { basePath: '/api' });
The `routes` method is a property of the main `loopback-component-explorer` export, used to mount the explorer as Express middleware.

Demonstrates how to initialize a basic LoopBack 3 application and mount the API Explorer at a specified path, exposing a simple 'Product' model.

var loopback = require('loopback'); var app = loopback(); var explorer = require('loopback-component-explorer'); 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);
Debug
Known issues
breakingLoopBack 3, for which `loopback-component-explorer` is designed, is in Maintenance LTS mode. This means only critical bugs and security fixes will be provided, and users are strongly urged to migrate to LoopBack 4.
fix
Plan and execute a migration of your application to LoopBack 4, which offers its own modern explorer solution (e.g., `@loopback/rest-explorer`).
affects: >=3.0.0
breakingVersion 3.0.0 of this component reverted to using the original `swagger-ui` module instead of a previously used custom fork. This change might subtly alter UI behavior, available features, or styling, as upstream fixes and improvements from `swagger-ui` were integrated.
fix
Thoroughly test your API Explorer functionality and appearance after upgrading to `v3.0.0` or higher to ensure compatibility with the updated `swagger-ui`.
affects: >=3.0.0
gotchaThe component is built on `swagger-ui` version 2.x, which is no longer maintained and has known security vulnerabilities (e.g., Cross-Site Scripting, Reverse Tabnapping, CSS injection, CVE-2019-17495). While `loopback-component-explorer` states it mitigates some specific advisories due to its limited usage patterns, the underlying dependency remains outdated and could pose risks.
fix
For enhanced security and access to modern features, consider migrating to LoopBack 4, which integrates with contemporary versions of Swagger UI or OpenAPI tools. Avoid exposing the explorer interface to untrusted users in production environments if possible.
affects: >=3.0.0
gotchaThis component is specifically designed for LoopBack 3 applications. It is not compatible with LoopBack 4, which has its own modular and OpenAPI-driven explorer components.
fix
For LoopBack 4 applications, use `@loopback/rest-explorer` or other native LoopBack 4 tools for API exploration.
affects: *
Upgrade
Version history
6.5.1latest on npm
Audit
Dependencies
loopbackrequiredRuntime dependency for integrating with LoopBack 3 applications.
swagger-uirequiredUnderlying UI library for API documentation; specific version 2.x is used.
Agent activity
8 hits · last 30 days
node
8
Resources
loopback-component-explorer — npm install loopback-component-explorer · libregistry