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