Commit Graph

357 Commits

Author SHA1 Message Date
Ryan Graham cb6eafd592
update copyright notices and license 2016-05-05 17:10:55 -07:00
Simon Ho cc53fbea98 Merge pull request #142 from Coobaha/fix/examples
examples launch fix
2016-05-02 11:07:19 -07:00
Miroslav Bajtoš 794394dabd 2.5.0
* Add feature to hide disabled remote methods after explorer is initialized (Supasate Choochaisri)
 * More fixes of indentation in index.js (Miroslav Bajtoš)
 * Fix broken indentation (Miroslav Bajtoš)
 * Fix linting errors (Amir Jafarian)
 * Auto-update by eslint --fix (Amir Jafarian)
 * Add eslint infrastructure (Amir Jafarian)
2016-05-02 13:01:11 +02:00
Alexander Ryzhikov 5385d3aaa2 Merge branch 'master' into fix/examples
* master:
  Add feature to hide disabled remote methods after explorer is initialized
  More fixes of indentation in index.js
  Fix broken indentation
  Fix linting errors
  Auto-update by eslint --fix
  Add eslint infrastructure
  2.4.0
  Add `swaggerUI` option to enable/disable UI serving
  2.3.0
  2.2.0
  remove references to ubuntu font
  Update swaggerObject when a new model was added

# Conflicts:
#	example/hidden.js
#	example/simple.js
2016-05-01 17:39:59 +03:00
Simon Ho 372f0243b6 Merge pull request #157 from supasate/feature/allow-disable-remote-method-after-init
Allow disabling remote method after initialize explorer
2016-04-30 18:08:58 -07:00
Supasate Choochaisri ff60f8bf91 Add feature to hide disabled remote methods after explorer is initialized
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-04-30 04:08:17 +07:00
Miroslav Bajtoš 45e0bf85e9 More fixes of indentation in index.js 2016-04-29 16:21:07 +02:00
Miroslav Bajtoš ce3c0f7a91 Merge pull request #158 from strongloop/fix/indentation
Fix broken indentation
2016-04-29 16:00:36 +02:00
Miroslav Bajtoš 67f48d5dcb Fix broken indentation
Partially revert 298765547
2016-04-29 15:36:44 +02:00
Amir-61 fabc7cf5fb Merge pull request #156 from strongloop/feature/eslint
Add eslint infrastructure
2016-04-25 11:21:15 -04:00
Amir Jafarian c923710ce2 Fix linting errors 2016-04-22 17:18:04 -04:00
Amir Jafarian 2987655479 Auto-update by eslint --fix 2016-04-22 17:09:48 -04:00
Amir Jafarian 144fc8000d Add eslint infrastructure 2016-04-22 17:07:56 -04:00
Raymond Feng 39ce73eee1 2.4.0
* Add `swaggerUI` option to enable/disable UI serving (Raymond Feng)
2016-03-08 13:00:23 -08:00
Raymond Feng dee0c40e11 Merge pull request #154 from strongloop/feature/add-swaggerUI-option
Add `swaggerUI` option to enable/disable UI serving
2016-03-08 12:58:59 -08:00
Raymond Feng 63f446511d Add `swaggerUI` option to enable/disable UI serving 2016-03-08 10:13:08 -08:00
Miroslav Bajtoš 9192ee638b 2.3.0 2016-02-02 10:45:58 +01:00
Raymond Feng 2821078273 2.2.0
* remove references to ubuntu font (Anthony Ettinger)

 * Update swaggerObject when a new model was added (Pradeep Kumar Tippa)

 * Refer to licenses with a link (Sam Roberts)
2016-01-13 16:10:56 -08:00
Anthony Ettinger 8786496da3 Merge pull request #148 from strongloop/feature/remove-invalid-fonts
remove references to ubuntu font
2016-01-13 14:47:35 -08:00
Anthony Ettinger 39d3fb447c remove references to ubuntu font 2016-01-13 11:26:00 -08:00
Miroslav Bajtoš 9e8a19f726 Merge pull request #141 from pktippa/master
Returning updated swaggerObject

Close #141
Fix #140
Fix https://github.com/strongloop/loopback/issues/1820
2016-01-05 10:45:31 +01:00
Pradeep Kumar Tippa 2186b69885 Update swaggerObject when a new model was added
Listen for loopback app's event "modelRemoted" to detect when a new
model was added, and re-run "createSwaggerObject" to get an updated
version.
2016-01-05 10:45:11 +01:00
Alexander Ryzhikov 69f6c41315 examples launch fix 2015-11-24 07:26:07 +03:00
Sam Roberts b8033fc1a1 Refer to licenses with a link 2015-11-03 12:27:49 -08:00
Miroslav Bajtoš 011af998a7 2.1.1
* disable Swagger validation badge (Hage Yaapa)
 * Updated "resourcePath: 'swaggerResources'" to "resourcePath: 'swagger.json'" (Dennis Ashby)
 * Use strongloop conventions for licensing (Sam Roberts)
2015-10-01 11:11:14 +02:00
Miroslav Bajtoš 90bbc9bffa Merge pull request #128 from hacksparrow/bugfix/swagger-validation-error
Disable Swagger validation badge
2015-10-01 11:09:55 +02:00
Hage Yaapa 71a7d9fa15 disable Swagger validation badge 2015-10-01 12:38:27 +05:30
Raymond Feng 0ec7e52711 Merge pull request #127 from dashby3000/master
Updated "resourcePath: 'swaggerResources'" to "resourcePath: 'swagger…
2015-09-30 13:13:12 -07:00
Dennis Ashby 3cc1011697 Updated "resourcePath: 'swaggerResources'" to "resourcePath: 'swagger.json'" 2015-09-30 11:34:24 -07:00
Sam Roberts bfe908bebf Use strongloop conventions for licensing 2015-09-21 16:42:54 -07:00
Miroslav Bajtoš 64993b82d6 2.1.0
* Rename the module to loopback-component-explorer (Rand McKinney)
2015-09-17 10:56:51 +02:00
Miroslav Bajtoš 4f4e8079f0 Merge pull request #125 from strongloop/rename
Rename package and module
2015-09-17 10:56:01 +02:00
Rand McKinney 8dae3c7330 Rename the module to loopback-component-explorer 2015-09-17 10:54:02 +02:00
Miroslav Bajtoš 1c8cea1fa4 2.0.1
* Sort APIs and operations. (Samuel Reed)
2015-09-08 18:19:52 +02:00
Miroslav Bajtoš 7959ad38aa Merge pull request #119 from STRML/sortEndpointsAgain
Sort APIs and operations.
2015-09-08 18:19:36 +02:00
Samuel Reed 0667fd1721 Sort APIs and operations.
Sorts APIs alphabetically.
Sorts operations alphabetically then by method.
2015-09-08 11:11:35 -05:00
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š 016a9b5457 Merge pull request #118 from strongloop/feature/use-loopback-swagger
Use loopback-swagger to generate swagger.json
2015-09-04 10:45:34 +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š e75d8bb353 Merge pull request #117 from hacksparrow/feature/register-self
Register loopback-explorer to app
2015-08-31 10:58:43 +02:00
Hage Yaapa e509dabf21 Register loopback-explorer to app
This patch registers loopback-explorer to the app object with its
options, making its mountPath property available at
app.get('loopback-explorer').
2015-08-28 23:52:04 +05:30
Miroslav Bajtoš 23c879c44e Merge pull request #115 from strongloop/feature/swagger-spec-2.0
[SEMVER-MAJOR] Generate Swagger Spec 2.0 documentation
2015-08-28 10:18:42 +02:00
Miroslav Bajtoš 0b17811546 Generate Swagger Spec 2.0 documentation
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.
2015-08-21 18:55:32 +02:00
Miroslav Bajtoš ee42f0386c Merge pull request #114 from strongloop/feature/upgrade-to-swagger-ui-2.1
Upgrade to strong-swagger-ui@21.0 (swagger-ui@2.1)
2015-08-13 16:05:51 +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š 75ea3f928a Merge pull request #104 from strongloop/feature/refactor-as-component
[SEMVER-MAJOR] Rework the module to a loopback component
2015-08-10 16:54:38 +02: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
Miroslav Bajtoš d1e02695c8 Merge pull request #99 from cndreiter:master
Add `opts.host` to customize host of resource URLs

Close #99
2015-08-04 15:49:01 +02:00