From 2decdcc234a0ff5aa9cf2620eaaf78ced2fa620d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 14 Oct 2014 10:12:21 +0200 Subject: [PATCH] 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. --- lib/swagger.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/swagger.js b/lib/swagger.js index b879a18..23fbff0 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -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',