Notable breaking changes:
- The swagger output is a single object (JSON response) served
at /explorer/swagger.json
- Methods with a single return arg without "root:true" flag
are expected to produce an object response with a single property now,
i.e. `{ data: arg }`.
In v1.x, we were treating such arg as if "root:true" was specified.
The new behaviour matches the actual implementation in strong-remoting.
- The property constraint "length" is translated to "maxLength" now.
- `operationId` includes model name now, because ids must be unique
- X-Forwarded-* headers are no longer processed, Swagger Spec 2.0
has a way how to specify "use the scheme + host where the doc is served"
- opts.omitProtocolInBaseUrl was removed for the same reasons as
X-Forwarded-* headers
- The deprecated opts.swaggerDistRoot was removed.
This has to be done before release because our staging registry is
essentialy a continusous deployment pipeline that makes use of the
major and minor version of master.
Rework the exported function to conform to the component convention:
var loopback = require('loopback');
var explorer = require('loopback-explorer');
var app = loopback();
explorer(app, options);
Allow users to mount explorer as a middleware too:
app.use('/explorer', explorer.routes(app, options));
- drop dependency on express
- drop support for loopback 1.x
- add a new option "mountPath" to specify where to mount the explorer UI
and swagger metadata
- describe upgrading from v1.x in README
* upstream/master: (53 commits)
1.8.0
Add opts.omitProtocolInBaseUrl
Fix tests broken by fa3035c (#96)
Fix model description getting lost
1.7.2
Allow submitting token input with empty value to remove token.
Fix duplicate stylesheet issue
Fix explorer tests for different line endings on Windows
1.7.1
Remove unused external font "Droid Sans".
1.7.0
Made API doc of class use the http.path of the class if available, or the name of the class as a fallback
v1.6.4
Prevent double slash in the resource URLs
v1.6.3
Allow `uiDirs` to be defined as a String
Fix bad CLA URL in CONTRIBUTING.md
Add X-UA-Compatible tag
v1.6.2
Move 200 response to `type` on the operation object. See #75.
...
* Allow submitting token input with empty value to remove token. (Samuel Reed)
* Fix duplicate stylesheet issue (Pradnya Baviskar)
* Fix explorer tests for different line endings on Windows (Pradnya Baviskar)