diff --git a/CHANGES.md b/CHANGES.md index 62327b5..54a0fd2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,23 @@ +2015-06-25, Version 1.8.0 +========================= + + * Add opts.omitProtocolInBaseUrl (Miroslav Bajtoš) + + * Fix tests broken by fa3035c (#96) (Miroslav Bajtoš) + + * Fix model description getting lost (bkniffler) + + +2015-03-30, Version 1.7.2 +========================= + + * Allow submitting token input with empty value to remove token. (Samuel Reed) + + * Fix duplicate stylesheet issue (Pradnya Baviskar) + + * Fix explorer tests for different line endings on Windows (Pradnya Baviskar) + + 2015-02-23, Version 1.7.1 ========================= diff --git a/lib/model-helper.js b/lib/model-helper.js index a3921fc..1a23f23 100644 --- a/lib/model-helper.js +++ b/lib/model-helper.js @@ -144,7 +144,8 @@ var modelHelper = module.exports = { out[name] = { id: name, additionalProperties: additionalProperties, - description: typeConverter.convertText(def.description), + description: typeConverter.convertText( + def.description || (def.settings && def.settings.description)), properties: properties, required: required }; diff --git a/lib/swagger.js b/lib/swagger.js index 908b155..92d0d90 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -192,8 +192,9 @@ function addRoute(app, uri, doc, opts) { var headers = req.headers; // NOTE header names (keys) are always all-lowercase var proto = headers['x-forwarded-proto'] || opts.protocol || req.protocol; + var prefix = opts.omitProtocolInBaseUrl ? '//' : proto + '://'; var host = headers['x-forwarded-host'] || headers.host; - doc.basePath = proto + '://' + host + initialPath; + doc.basePath = prefix + host + initialPath; } res.status(200).send(doc); }); diff --git a/package.json b/package.json index bf457ea..77193c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-explorer", - "version": "1.7.1", + "version": "1.8.0", "description": "Browse and test your LoopBack app's APIs", "main": "index.js", "scripts": { @@ -22,9 +22,9 @@ }, "devDependencies": { "loopback": "git+https://github.com/shelbys/loopback.git#validate_param_enum", - "mocha": "^2.2.5", - "supertest": "~1.0.1", - "chai": "^2.3.0" + "mocha": "^1.21.5", + "supertest": "~0.14.0", + "chai": "^1.9.1" }, "license": { "name": "Dual MIT/StrongLoop", @@ -35,6 +35,6 @@ "debug": "~1.0.3", "express": "3.x", "lodash": "^2.4.1", - "swagger-ui": "git+https://github.com/shelbys/swagger-ui.git" + "swagger-ui": "git+https://github.com/shelbys/swagger-ui.git" } } diff --git a/public/css/loopbackStyles.css b/public/css/loopbackStyles.css index babf1a7..54b4844 100644 --- a/public/css/loopbackStyles.css +++ b/public/css/loopbackStyles.css @@ -34,7 +34,6 @@ color: #080; } -<<<<<<< HEAD .contentWell { padding-left: 30px; padding-right: 30px; @@ -43,13 +42,11 @@ /* FIXME: Separate the overrides from the rest of the styles, rather than override screen.css entirely. */ -======= /* Improve spacing when the browser window is small */ #message-bar, #swagger-ui-container { padding-left: 30px; padding-right: 30px; } ->>>>>>> upstream/master #api_selector { padding: 0px 20px; diff --git a/public/index.html b/public/index.html index 5696c68..9c869b8 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,6 @@