Merge branch 'release/1.2.9' into production

This commit is contained in:
Raymond Feng 2014-08-15 23:41:32 -07:00
commit 03bbc8f1fb
4 changed files with 7 additions and 6 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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()
});

View File

@ -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": {