Commit Graph

387 Commits

Author SHA1 Message Date
Miroslav Bajtoš b540651658 v1.6.2 2014-12-12 13:56:52 +01:00
Miroslav Bajtoš ef9fcda238 Merge pull request #80 from STRML/typeAttr
Move 200 response to `type` on the operation object. See #75.
2014-12-12 13:56:14 +01:00
Samuel Reed 28a5a2619a Move 200 response to `type` on the operation object. See #75. 2014-12-12 13:48:58 +01:00
Miroslav Bajtoš 53840d182c Merge tag 'v1.6.1'
1.6.1

 * Use full lodash instead of lodash components (Ryan Graham)
2014-12-08 08:10:12 +01:00
Miroslav Bajtoš 98e53069db Merge branch 'release/1.6.1' into production 2014-12-08 08:10:10 +01:00
Miroslav Bajtoš f3480f857c v1.6.1 2014-12-08 08:10:06 +01:00
Miroslav Bajtoš b035e1472c Merge pull request #78 from strongloop/feature/lodash-diet
Use full lodash instead of lodash components
2014-12-03 08:22:11 +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š 0b99b3f6f1 Merge tag 'v1.6.0'
1.6.0

 * Remove model name from nickname, swagger spec understands op context. (Samuel Reed)
2014-12-02 09:08:47 +01:00
Miroslav Bajtoš 096699d57f Merge branch 'release/1.6.0' into production 2014-12-02 09:08:45 +01:00
Miroslav Bajtoš 33d0ac9531 v1.6.0 2014-12-02 09:08:43 +01:00
Samuel Reed fe434e7ee9 Merge pull request #73 from STRML/nickname
Remove model name from nickname, swagger spec understands op context.
2014-12-01 21:29:27 +01:00
Miroslav Bajtoš 1922a27fe1 Merge tag 'v1.5.2'
1.5.2

 * model-helper: ignore unknown property types (Miroslav Bajtoš)
2014-11-29 12:11:34 +01:00
Miroslav Bajtoš 95e458c09b Merge branch 'release/1.5.2' into production 2014-11-29 12:11:32 +01:00
Miroslav Bajtoš 22cf27dac8 v1.5.2 2014-11-29 12:11:31 +01:00
Miroslav Bajtoš 738928e622 Merge pull request #77 from strongloop/fix/skip-unknown-property-types
model-helper: ignore unknown property types
2014-11-29 12:10:15 +01:00
Samuel Reed 8147ba5821 Remove model name from nickname, swagger spec understands op context.
This removes the redundancy from paths in swagger-ui such as
`/api/user/user_login`. It will now be displayed simply as
`/api/user/login`.

This is consistent with how `nickname` is used in Swagger examples.

Added tests to route nickname processing.
2014-11-29 12:07:58 +01:00
Miroslav Bajtoš 4e5cbe43f9 model-helper: ignore unknown property types 2014-11-29 12:05:12 +01:00
Samuel Reed ce76f17ee1 Save accessToken in localStorage. Fixes #47 2014-11-10 10:11:25 +00:00
Shelby Sanders 9de19e851e Merge branch 'master' of github.com:shelbys/loopback-explorer
* 'master' of github.com:shelbys/loopback-explorer:
  added reference to settings for additional properties
2014-11-07 20:47:30 -08:00
Shelby Sanders 4a40f18251 Added support for public in order to hide operations from Swagger 2014-11-07 20:47:20 -08:00
Shelby Sanders ed22de9daf Merge pull request #2 from shelbys/additional_properties_patch
added reference to settings for additional properties
2014-10-28 19:40:00 -07:00
Jake Ayala 657f5e2119 added reference to settings for additional properties 2014-10-28 19:21:47 -07:00
Miroslav Bajtoš e9d990bf11 Merge tag 'v1.5.1'
1.5.1
2014-10-24 19:37:50 +02:00
Miroslav Bajtoš b9efd48d37 Merge branch 'release/1.5.1' into production 2014-10-24 19:36:14 +02:00
Miroslav Bajtoš b9a74a0b20 1.5.1 2014-10-24 19:34:32 +02:00
Miroslav Bajtoš 6cc0d9f16a Merge tag 'v1.5.0'
1.5.0
2014-10-24 19:32:01 +02:00
Miroslav Bajtoš 46dc9b1d4d Merge branch 'release/1.5.0' into production 2014-10-24 19:31:56 +02:00
Miroslav Bajtoš ee2d0d4ddb 1.5.0 2014-10-24 19:31:30 +02:00
Miroslav Bajtoš 0daf2d3dc4 Merge pull request #68 from strongloop/feature/custom-swagger-ui
Add options `overridesDist` and `swaggerUiDist`
2014-10-24 19:29:25 +02:00
Miroslav Bajtoš 2ec096a278 Add an option `uiDirs`
The `uiDirs` option allows users to provide their own set of directories
with UI files, e.g. to provide a custom swagger-ui fork and a custom
set of style/font overrides:

    explorer(app, {
      uiDirs: [
        path.resolve(__dirname, 'public'),
        path.resolve(__dirname, 'node_modules', 'swagger-ui')
      ]
    });

The existing option `swaggerDistRoot` is deprecated now.
2014-10-24 19:24:34 +02:00
Miroslav Bajtoš 8c5354cc8c Merge pull request #69 from strongloop/feature/honour-x-forwarded-headers
swagger: honour X-Forwarded-Proto header
2014-10-23 20:16:12 +02:00
Miroslav Bajtoš a4179e454a swagger: honour X-Forwarded-Proto header
Improve the algorithm building `baseUrl` to honour `X-Forwarded-Proto`
header when it is present.
2014-10-22 11:10:15 +02:00
Raymond Feng d18d64b41d Merge tag 'v1.4.0'
1.4.0
2014-10-21 15:40:28 -07:00
Raymond Feng ba8fdfdfd6 Merge branch 'release/1.4.0' into production 2014-10-21 15:40:22 -07:00
Raymond Feng 1b288406d1 Bump version 2014-10-21 15:39:26 -07:00
Miroslav Bajtoš 530808312a Merge pull request #61 from strongloop/feature/godaddy-improvements-round-2
GoDaddy improvements - round 2
2014-10-16 18:59:28 +02:00
Miroslav Bajtoš 6fb81c279b Add integration tests for included models
Add tests verifying that Swagger docs include model description for
recursively nested references to Models and Arrays of Models in
properties, modelTo and modelThrough relations, accepts,
returns and errors.

Fix bugs discovered along the way.
2014-10-16 14:43:59 +02:00
Miroslav Bajtoš d05dcb71df route-helper: add `responseMessages`
Add a default "success" response message, the status code is 200 or 204
depending on whether the method returns any data.

Append any error messages as specified in the `errors` property
of method's remoting metadata.

Move the description of operation's return type to the "success"
response message.

Include error message models in the API models.
2014-10-16 14:04:02 +02:00
Miroslav Bajtoš 9a6bd35df7 model-helper: support anonymous object types
Accepts/returns arguments allow anonymous object types, e.g.

    { 'arg': 'kvp', type: { 'name': 'string', 'value': 'string' } }

As of this commit, these types are converted to Swagger type 'object'.
2014-10-16 13:51:53 +02:00
Miroslav Bajtoš aa7cb0b118 swagger: include models from accepts/returns args
Models not attached to the app are included too.
2014-10-16 10:34:41 +02:00
Miroslav Bajtoš d212741638 loopbackStyles: improve spacing in small window
Improve spacing of page elements when the browser window is small.
2014-10-16 10:34:41 +02:00
Miroslav Bajtoš 2decdcc234 swagger: Deprecate `opts.swaggerVersion`
Users of loopback-explorer should not override the swagger version,
as it's the explorer who decides what version of the Swagger Spec
it implements.
2014-10-16 10:34:41 +02:00
Miroslav Bajtoš 6838087a5c swagger: use X-Forwarded-Host for basePath 2014-10-16 10:34:41 +02:00
Miroslav Bajtoš dd27b2428c Merge pull request #65 from strongloop/fix/example
example: use PersistedModel instead of Model
2014-10-16 10:19:40 +02:00
Miroslav Bajtoš 604248ec17 example: use PersistedModel instead of Model
Use `PersistedModel` as a base for the Product model to ensure
it has some methods to inspect in the explorer.
2014-10-16 10:17:47 +02:00
Miroslav Bajtoš 0f5ab45c0b Merge pull request #64 from strongloop/feature/property-constraints
Preserve property type constraints
2014-10-16 08:58:37 +02:00
Miroslav Bajtoš 060354cff8 models: include model's `description` 2014-10-16 08:47:18 +02: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š 42dedfcacc Move `convertText` to `typeConverter`
Create a new module `lib/type-converter.js`.

Move `routeHelper.convertText` to this new module.
2014-10-16 08:46:37 +02:00