Commit Graph

117 Commits

Author SHA1 Message Date
Miroslav Bajtoš 9d20fe8b7d 2.0.0
* Use loopback-swagger to generate swagger.json (Miroslav Bajtoš)
 * Bump up strong-swagger-ui version to ^21.0.0 (Miroslav Bajtoš)
 * Register loopback-explorer to app (Hage Yaapa)
 * Generate Swagger Spec 2.0 documentation (Miroslav Bajtoš)
 * Upgrade to strong-swagger-ui@21.0 (swagger-ui@2.1) (Miroslav Bajtoš)
 * bump major version (Ryan Graham)
 * Rework the module to a loopback component (Miroslav Bajtoš)
 * Add `opts.host` to customize host of resource URLs (cndreiter)
 * Removed branch-lock, and bumped version (Shelby Sanders)
 * Corrected to propagate properties from existing items object (Shelby Sanders)
 * Use strong-swagger-ui instead of swagger-ui (Miroslav Bajtoš)
 * Remove public/images/throbber.gif (Miroslav Bajtoš)
 * Move CSS customizations to loopbackStyles.css (Miroslav Bajtoš)
 * Added Swagger fields for items and max/min(Items|Length) (Shelby Sanders)
 * Corrected accidental duplication of responseMessages from merge (Shelby Sanders)
 * review comments (Ying Tang)
 * add more tests (Ying Tang)
 * float additionalProperties and description to top (Ying Tang)
 * Convert array to string for summary, note, and description. Fix additionalProperties (Ying Tang)
 * back out changes of id to URI (Ying Tang)
 * Uri id and $ref, join description (Ying Tang)
 * propertyName, not property (Ying Tang)
 * fix resource listing and remove id from each property (Ying Tang)
 * remove id fields from required array (Ying Tang)
 * remove required from sub-schema (Ying Tang)
 * bump version (Ying Tang)
 * add $ref and remove type for models (Ying Tang)
 * Changed Swagger() to omit resources with no content (Shelby Sanders)
 * Added event emission for swaggerResources to support customization (Shelby Sanders)
 * Corrected handling of type for operation, including containers (Shelby Sanders)
 * Corrected handling for absent settings.additionalProperties (Shelby Sanders)
 * Added support for public in order to hide operations from Swagger (Shelby Sanders)
 * added reference to settings for additional properties (Jake Ayala)
 * Protected against non-Model generation requests (Shelby Sanders)
 * Corrected merge issues (Shelby Sanders)
 * Added padding to content well in order to counteract changes in SwaggerUI (Shelby Sanders)
 * Added support for scanning accepts params for Model references (Shelby Sanders)
 * Changed addRoute() to honor X-Forwarded-Host (Shelby Sanders)
 * Removed branch-lock for loopback (Shelby Sanders)
 * Changed to possibly pull model description from ctor.settings (Shelby Sanders)
 * Corrected generateModelDefinition() to scan for model references nested in other models (Shelby Sanders)
 * Corrected prepareDataType() to handle collections and nesting, and changed to always and only use responseMessages (Shelby Sanders)
 * Corrected generateModelDefinition() to scan for model references in remote returns and errors (Shelby Sanders)
 * Corrected default for consumes+produces (Shelby Sanders)
 * Ported prepareDataType() from old strong-remoting:ext/swagger.js (Shelby Sanders)
 * Corrected issues with merge of 2.x changes (Shelby Sanders)
 * Load swagger ui from `swagger-ui` package instead. (Samuel Reed)
 * Ported extensions for more Swagger 1.2 metadata, returns+errors as responseMessages, consumes+produces, and X-Forwarded-Proto for reverse-proxying from HTTPS to HTTP (Shelby Sanders)
 * Upgraded to SwaggerUI 2.0.18 (Shelby Sanders)
 * Added support for toggling Model and Schema, and added support for primitives in StatusCodeView (Shelby Sanders)
 * Ensure Response Content Type is shown regardless of Response Class (Shelby Sanders)
 * Reverted to use special loading logic from loopback-explorer (Shelby Sanders)
 * Updated to latest Swagger-UI for better responseMessage signature handling (Shelby Sanders)
 * Upgraded to latest Swagger-UI for 1.2 support (Shelby Sanders)
 * Correct description of collections of object and nested (Shelby Sanders)
 * Add indication of response being a collection (Shelby Sanders)
2015-09-04 10:47:02 +02:00
Miroslav Bajtoš 42b9f2d7c0 Use loopback-swagger to generate swagger.json 2015-09-03 10:37:09 +02:00
Miroslav Bajtoš a2a85cd319 Bump up strong-swagger-ui version to ^21.0.0 2015-09-01 17:19:57 +02:00
Miroslav Bajtoš 30017c8242 Upgrade to strong-swagger-ui@21.0 (swagger-ui@2.1) 2015-08-13 15:58:35 +02:00
Ryan Graham 8c82f17930 bump major version
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.
2015-08-10 14:51:28 -07:00
Miroslav Bajtoš 7ee8703ff5 Rework the module to a loopback component
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
2015-08-10 16:51:03 +02:00
Raymond Feng 89d48f609a Merge branch 'master' of https://github.com/shelbys/loopback-explorer into shelbys-master 2015-07-30 13:52:07 -07:00
Shelby Sanders 732301d709 Removed branch-lock, and bumped version 2015-07-22 15:06:17 -07:00
Shelby Sanders 43e84c4cb1 Corrected to propagate properties from existing items object 2015-07-15 17:17:33 -07:00
Miroslav Bajtoš 073beebcb7 Use strong-swagger-ui instead of swagger-ui 2015-07-10 14:00:52 +02:00
Shelby Sanders 1294b53f5c Merge remote-tracking branch 'upstream/master' into validate_param_enum
* 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.
  ...
2015-07-02 11:19:18 -07:00
Shelby Sanders 1bf7c27a56 Merge remote-tracking branch 'upstream/master' into validate_param_enum 2015-07-02 11:03:27 -07:00
Miroslav Bajtoš 265d1cdbe1 1.8.0
* Add opts.omitProtocolInBaseUrl (Miroslav Bajtoš)

 * Fix tests broken by fa3035c (#96) (Miroslav Bajtoš)

 * Fix model description getting lost (bkniffler)
2015-06-25 18:53:53 +02:00
Miroslav Bajtoš c9b6d451cc 1.7.2
* 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)
2015-03-30 15:19:38 +02:00
Ying Tang 022403eadc bump version 2015-03-26 22:33:12 -07:00
Miroslav Bajtoš 780929ab73 1.7.1
* Remove unused external font "Droid Sans". (Miroslav Bajtoš)
2015-02-23 18:29:44 +01:00
Raymond Feng 8e82a5cabd 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 (gandrianakis)
2015-02-17 08:50:11 -08:00
Shelby Sanders 24146313ec Changed Swagger() to omit resources with no content 2015-02-07 22:59:00 -08:00
Miroslav Bajtoš 79e21fde10 v1.6.4 2015-01-09 14:48:07 +01:00
Miroslav Bajtoš cbf3b36aef v1.6.3 2015-01-06 09:23:09 +01:00
Miroslav Bajtoš b540651658 v1.6.2 2014-12-12 13:56:52 +01:00
Miroslav Bajtoš f3480f857c v1.6.1 2014-12-08 08:10:06 +01:00
Ryan Graham 6b5a016c59 Use full lodash instead of lodash components
This change trims 134 modules from the dependency tree, many of which
were duplicate depdencies between the 4 lodash.function modules used
and their sub-dependencies.

Before:
$ npm ls | wc -l
     494
$ du -sch node_modules/lodash*
 432K   node_modules/lodash.assign
 660K   node_modules/lodash.clonedeep
  96K   node_modules/lodash.defaults
 980K  node_modules/lodash.pick
 2.1M  total

After:
$ npm ls | wc -l
     360
$ du -sch node_modules/lodash*
964K   node_modules/lodash
964K   total
2014-12-02 19:14:58 -08:00
Miroslav Bajtoš 33d0ac9531 v1.6.0 2014-12-02 09:08:43 +01:00
Miroslav Bajtoš 22cf27dac8 v1.5.2 2014-11-29 12:11:31 +01:00
Miroslav Bajtoš b9a74a0b20 1.5.1 2014-10-24 19:34:32 +02:00
Miroslav Bajtoš ee2d0d4ddb 1.5.0 2014-10-24 19:31:30 +02:00
Raymond Feng 1b288406d1 Bump version 2014-10-21 15:39:26 -07:00
Miroslav Bajtoš dc815a8421 Refactor conversion of data types
Refactor the way how loopback types are converted to swagger data types.

 - `modelHelper.LDLPropToSwaggerDataType` is responsible for
   producing a valid Swagger Data Type object from LDL object
   (be it a property, accepts item or returns item).

 - LDLPropToSwaggerDataType picks only fields that are part
   of the swagger spec, everything else is excluded from the result.
   It's up to the caller to add extra fields like `description`.

 - refactor `routeHelper.extendWithType` to accept an additional arg:
   the original LDL object. This way it's possible to copy all
   type-specific fields to the output object and don't add anything
   else.
2014-10-16 08:47:18 +02:00
Miroslav Bajtoš c31c89a29a package: update devDependencies
- loopback 1.x to ^2.4.1
 - mocha ~1.20.1 to ^1.21.5
 - supertest ~0.13.0 to ~0.14.0
2014-10-14 14:15:17 +02:00
Miroslav Bajtoš 546a122eaa 1.3.0 2014-10-08 19:22:45 +02:00
Miroslav Bajtoš f645c6db0d swagger: allow cross-origin requests
Add CORS middleware to the swagger app.

Add a configuration option allowing developers to disable CORS.
2014-10-08 07:57:50 +02:00
Shelby Sanders 8563dd0463 Merge remote-tracking branch 'upstream/master'
* upstream/master:
  Sort endpoints by letter.
  Add syntax highlighting styles & highlight threshold.
  Add contribution guidelines
  Bump version
  Fix how the array of models is iterated
  Bump version
  Make sure nested/referenced models in array are mapped to swagger
  Make sure nested/referenced models are mapped to swagger
  Bump version
  Newest Swagger UI requires application/x-www-form-urlencoded.
  Use `dist` property from swagger-ui package.
  Fixed undefined modelClass when using polymorphic relations
  Bump version
  Fix the type name for a property if model class is used

Conflicts:
	lib/model-helper.js
	lib/swagger.js
	public/css/loopbackStyles.css
2014-10-07 11:57:15 -07:00
Raymond Feng b488fa3c25 Bump version 2014-09-22 09:04:47 -07:00
Raymond Feng 91caa92be7 Bump version 2014-09-05 15:44:50 -07:00
Raymond Feng 937ec98c97 Bump version 2014-08-15 23:37:10 -07:00
Raymond Feng b1fc7347ce Bump version 2014-08-08 11:21:42 -07:00
Shelby Sanders a4ab8023dc Removed branch-lock for loopback 2014-08-07 13:07:36 -07:00
Shelby Sanders 28d293b6f9 Merge remote-tracking branch 'upstream/master'
* upstream/master:
  Bump version
  Set up default consumes/produces media types
  Fix the default opts
  Add required swagger 1.2 items property for property type array
  Allow passing a custom protocol.

Conflicts:
	lib/swagger.js
2014-08-04 18:20:59 -07:00
Shelby Sanders 3dc7de6881 Ported extensions for more Swagger 1.2 metadata, returns+errors as responseMessages, consumes+produces, and X-Forwarded-Proto for reverse-proxying from HTTPS to HTTP 2014-08-04 18:19:09 -07:00
Raymond Feng db0ca06a4d Bump version 2014-08-04 09:08:49 -07:00
Raymond Feng 4da82cbac8 Bump version 2014-07-29 08:54:48 -07:00
Raymond Feng 8c6fc47276 Bump version 2014-07-25 09:10:54 -07:00
Miroslav Bajtoš bb683e20a9 1.2.4 2014-07-22 21:57:53 +02:00
Miroslav Bajtoš 6eb2dabf0c 1.2.3 2014-07-22 21:46:00 +02:00
Raymond Feng cf5796db93 Bump version 2014-07-20 21:50:32 -07:00
Raymond Feng c84e38ac1c Bump version 2014-07-18 15:52:35 -07:00
Raymond Feng aa36e1cc81 Bump version and update deps 2014-07-14 13:48:40 -07:00
Samuel Reed 5c130a4b3d Fix debug namespace, express version. 2014-07-11 14:22:18 -04:00
Samuel Reed cbf768f0b8 Remove peerDependencies, use express directly. 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 19c3fe3870 Fix missing strong-remoting devDependency. 2014-07-09 12:03:50 -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
Miroslav Bajtoš 5bf0223d71 1.1.1 2014-05-28 19:26:51 +02:00
Miroslav Bajtoš e2a19a9578 package.json: add support for loopback 2.x
Modify the peer dependency version spec to include 2.x versions.
2014-05-28 19:06:08 +02:00
Raymond Feng bc1bde89c5 Fix license url 2014-02-17 16:09:05 -08:00
Raymond Feng d93c9557af Update to dual MIT/StrongLoop license 2014-02-17 16:04:12 -08:00
Miroslav Bajtoš d47a060b9d v1.1.0 2014-01-14 09:42:06 +01:00
Miroslav Bajtoš 6615013ef4 Merge pull request #10 from strongloop/feature/use-restApiRoot
Use app.restApiRoot
2014-01-14 00:20:46 -08:00
Miroslav Bajtoš 2d15b9c052 Bump up loopback min version to 1.5 2014-01-14 08:34:34 +01:00
Raymond Feng b4f91a57a2 Bump version 2014-01-13 13:42:14 -08:00
Ritchie Martori dbaf686db4 Bump version 2013-12-04 07:20:05 -08: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 8cf1d2e486 Move supertest to dev deps 2013-11-05 11:28:29 -08:00
Ritchie Martori f3d6cb9b54 Initial explorer 2013-11-05 11:16:59 -08:00