Merge branch 'master' into ft/3584-operation-container-component

This commit is contained in:
Owen Conti
2017-08-20 08:07:15 -06:00
committed by GitHub
15 changed files with 203 additions and 18 deletions

View File

@@ -41,6 +41,9 @@ module.exports = function SwaggerUI(opts) {
displayOperationId: false,
displayRequestDuration: false,
deepLinking: false,
requestInterceptor: (a => a),
responseInterceptor: (a => a),
showMutatedRequest: true,
// Initial set of plugins ( TODO rename this, or refactor - we don't need presets _and_ plugins. Its just there for performance.
// Instead, we can compile the first plugin ( it can be a collection of plugins ), then batch the rest.
@@ -63,6 +66,9 @@ module.exports = function SwaggerUI(opts) {
let queryConfig = parseSearch()
const domNode = opts.domNode
delete opts.domNode
const constructorConfig = deepExtend({}, defaults, opts, queryConfig)
const storeConfigs = deepExtend({}, constructorConfig.store, {
@@ -106,8 +112,8 @@ module.exports = function SwaggerUI(opts) {
let mergedConfig = deepExtend({}, localConfig, constructorConfig, fetchedConfig || {}, queryConfig)
// deep extend mangles domNode, we need to set it manually
if(opts.domNode) {
mergedConfig.domNode = opts.domNode
if(domNode) {
mergedConfig.domNode = domNode
}
store.setConfigs(mergedConfig)