Merge branch 'release/1.2.9' into production
This commit is contained in:
commit
03bbc8f1fb
3
index.js
3
index.js
|
@ -8,8 +8,7 @@ var urlJoin = require('./lib/url-join');
|
|||
var _defaults = require('lodash.defaults');
|
||||
var express = require('express');
|
||||
var swagger = require('./lib/swagger');
|
||||
var SWAGGER_UI_ROOT = path.join(__dirname, 'node_modules',
|
||||
'swagger-ui', 'dist');
|
||||
var SWAGGER_UI_ROOT = require('swagger-ui').dist;
|
||||
var STATIC_ROOT = path.join(__dirname, 'public');
|
||||
|
||||
module.exports = explorer;
|
||||
|
|
|
@ -67,7 +67,9 @@ var modelHelper = module.exports = {
|
|||
// Generate model definitions for related models
|
||||
for (var r in modelClass.relations) {
|
||||
var rel = modelClass.relations[r];
|
||||
if (rel.modelTo){
|
||||
generateModelDefinition(rel.modelTo, out);
|
||||
}
|
||||
if (rel.modelThrough) {
|
||||
generateModelDefinition(rel.modelThrough, out);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) {
|
|||
swaggerVersion: '1.2',
|
||||
basePath: loopbackApplication.get('restApiRoot') || '/api',
|
||||
resourcePath: 'resources',
|
||||
// Default consumes/produces to application/json
|
||||
consumes: ['application/json'],
|
||||
// Default consumes/produces
|
||||
consumes: ['application/json', 'application/x-www-form-urlencoded'],
|
||||
produces: ['application/json'],
|
||||
version: getVersion()
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "loopback-explorer",
|
||||
"version": "1.2.8",
|
||||
"version": "1.2.9",
|
||||
"description": "Browse and test your LoopBack app's APIs",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue