Merge pull request #2927 from shockey/bug/2919-relative-spec-infer-scheme

Infer scheme with relative-path specs
This commit is contained in:
shockey
2017-04-18 19:58:41 -07:00
committed by GitHub
11 changed files with 55 additions and 56 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;AAkoJA;AAyiCA;;;;;AAskCA;AA66IA;AA20FA;AAg3GA;AAonEA;AA+9CA;AA6/CA;AA+rCA;AA+3EA;AA68HA;;;;;;;;;;;;;;AA8tGA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAyxDA;AAw6BA;;;;;;AAs0EA;AA24FA;;;;;AAy3CA;AA2qFA;AAw2CA;AA2kCA;AAq/CA;AAwwEA;AA48FA;;;;;;;;;AA81BA;AA2zIA;AAi4DA;AAqlDA;;;;;;AA4kCA;AA8iHA;AAipGA","sourceRoot":""}
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AA66IA;AA47FA;AAyrGA;AA8hFA;AA6rFA;AAm9CA;AA4hDA;AA0rCA;AA47EA;AA+yHA;;;;;;;;;;;;;;AAmvIA;AA4mIA;AAquJA;AAwsHA;AAinGA;AAmiEA;AAy4DA;AAm2DA;AAytBA;;;;;;AA68EA;AAm0FA;;;;;AA23CA;AA2qFA;AAw2CA;AA2kCA;AAq/CA;AA6kFA;AA81FA;;;;;;;;;AAo4CA;AA2zIA;AAi4DA;AAqlDA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA6PA;AAyiGA","sourceRoot":""}
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA4QA;AAitGA","sourceRoot":""}

2
dist/swagger-ui.css vendored

File diff suppressed because one or more lines are too long

2
dist/swagger-ui.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -67,7 +67,7 @@
"reselect": "2.5.3",
"serialize-error": "2.0.0",
"shallowequal": "0.2.2",
"swagger-client": "^3.0.5",
"swagger-client": "^3.0.6",
"url-parse": "^1.1.8",
"whatwg-fetch": "0.11.1",
"worker-loader": "^0.7.1",

View File

@@ -294,8 +294,8 @@ export const operationScheme = ( state, path, method ) => {
let url = state.get("url")
let matchResult = url.match(/^([a-z][a-z0-9+\-.]*):/)
let urlScheme = Array.isArray(matchResult) ? matchResult[1] : null
return state.getIn(["scheme", path, method]) || state.getIn(["scheme", "_defaultScheme"]) || urlScheme || "http"
return state.getIn(["scheme", path, method]) || state.getIn(["scheme", "_defaultScheme"]) || urlScheme || ""
}
export const canExecuteScheme = ( state, path, method ) => {