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:
parent
6838087a5c
commit
2decdcc234
|
@ -23,6 +23,9 @@ var cors = require('cors');
|
||||||
* @param {Object} opts Options.
|
* @param {Object} opts Options.
|
||||||
*/
|
*/
|
||||||
function Swagger(loopbackApplication, swaggerApp, opts) {
|
function Swagger(loopbackApplication, swaggerApp, opts) {
|
||||||
|
if (opts && opts.swaggerVersion)
|
||||||
|
console.warn('loopback-explorer\'s options.swaggerVersion is deprecated.');
|
||||||
|
|
||||||
opts = _defaults(opts || {}, {
|
opts = _defaults(opts || {}, {
|
||||||
swaggerVersion: '1.2',
|
swaggerVersion: '1.2',
|
||||||
basePath: loopbackApplication.get('restApiRoot') || '/api',
|
basePath: loopbackApplication.get('restApiRoot') || '/api',
|
||||||
|
|
Loading…
Reference in New Issue