Commit Graph

15 Commits

Author SHA1 Message Date
Samuel Reed cefbdb361e Fix resources if the explorer is at a deep path. 2014-07-11 14:56:32 -04:00
Samuel Reed 6224243791 Remove preMiddleware.
Not necessary since this can easily be done with an app.use() before
calling loopback-explorer.
2014-07-10 14:16:10 -05:00
Samuel Reed cbf768f0b8 Remove peerDependencies, use express directly. 2014-07-10 14:09:57 -05:00
Samuel Reed 75713f16f2 Add url-join so path.join() doesn't break windows 2014-07-10 14:09:57 -05:00
Samuel Reed 70dddef296 Use express routes instead of modifying remoting.
This completes the migration of swagger processing from strong-remoting
into loopback-explorer.

Added additional usage instructions to README and additional testing.

This commit introduces a change into where resource descriptors
are hosted. They are no longer hosted under /swagger, but instead
under the same path as the Explorer, wherever that may be.
Generally, the resource listing will be available at
/explorer/resources, and api listings under
/explorer/resources/{modelName}.
2014-07-09 18:13:47 -05:00
Samuel Reed 5f22982200 Allow easy setting of accessToken in explorer UI. 2014-07-09 11:45:44 -05:00
Samuel Reed 4c0ce42001 Refactoring swagger 1.2 rework.
Added comments, api version, and better Swagger 1.2 compat.
2014-07-05 14:32:00 -05:00
Samuel Reed eb31787fbc Swagger 1.2 compatability. Moved strong-remoting/ext/swagger to this module.
Will now correctly return model schemas.

Moved swagger.js tests to this module.
2014-07-04 17:09:03 -05:00
Samuel Reed 56003f0178 Load swagger ui from `swagger-ui` package instead.
Added option `swaggerDistRoot` for specific file overrides.
2014-07-04 14:28:47 -05:00
Alex Pica ee79c4bf5d Make sure X-Powered-By header is disabled 2014-04-21 05:29:01 +03:00
Miroslav Bajtoš 8b6fc55de8 Use `app.get('restApiRoot')` as default basePath 2014-01-07 16:56:58 +01:00
Miroslav Bajtoš 6c4e780ab8 Replace strong-remoting ext/swagger with app.docs
Use `app.docs()` to expose Swagger specs. This way we don't have to
depend on loopback's dependency strong-remoting.
2014-01-07 16:13:34 +01:00
Miroslav Bajtos eb06404157 Fix loading of loopback dependencies.
Loopback-explorer loads express and strong-remoting from loopback's
`node_modules` folder. This fails when one of those dependencies
was installed to the parent project, e.g. as a peer dependency.

    app/node_modules
     +- express # <- express installed as peer to loopback
     +- loopback
         +- node_modules # <- express is not there

As of this commit, loopback-explorer will retry the `require()` call
without `loopback/node_modules` prefix if the first require fails.

    1. `require('loopback/node_modules/express')`
    2. `require('express')`

The change should fix (some of) unit-tests failures in
  https://github.com/strongloop/loopback-workspace
2013-12-09 11:37:38 +01:00
Miroslav Bajtos a33c067ffa Support custom basePath
Recognize the `basePath` passed to swagger extension and use it in
the webpage to construct the correct `discoveryUrl`.
2013-11-29 16:26:16 +01:00
Ritchie Martori f3d6cb9b54 Initial explorer 2013-11-05 11:16:59 -08:00