swagger: Deprecate `opts.swaggerVersion`

Users of loopback-explorer should not override the swagger version,
as it's the explorer who decides what version of the Swagger Spec
it implements.
This commit is contained in:
Miroslav Bajtoš 2014-10-14 10:12:21 +02:00
parent 6838087a5c
commit 2decdcc234
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ var cors = require('cors');
* @param {Object} opts Options.
*/
function Swagger(loopbackApplication, swaggerApp, opts) {
if (opts && opts.swaggerVersion)
console.warn('loopback-explorer\'s options.swaggerVersion is deprecated.');
opts = _defaults(opts || {}, {
swaggerVersion: '1.2',
basePath: loopbackApplication.get('restApiRoot') || '/api',