* 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.
...
SwaggerUI builds resource URL by concatenating basePath + resourcePath.
Since the resource paths are always startign with a slash, if the
basePath ends with a slash too, an incorrect URL is produced.
This was typically happenning when `restApiRoot` was '/'.
This commit modifies the code producing the base path to remove
the trailing slash.
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
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.
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.
* 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
* 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
Used to get warning: 'express deprecated res.send(status, body): Use
res.status(status).send(body) instead
node_modules/loopback-explorer/lib/swagger.js:105:9'
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}.