swagger-client 3.24.1 → 3.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -358,7 +358,7 @@ function oas3BaseUrl(_ref2) {
|
|
|
358
358
|
selectedServerUrl = servers[0].url; // eslint-disable-line semi
|
|
359
359
|
[selectedServerObj] = servers;
|
|
360
360
|
}
|
|
361
|
-
if (selectedServerUrl.
|
|
361
|
+
if (selectedServerUrl.includes('{')) {
|
|
362
362
|
// do variable substitution
|
|
363
363
|
const varNames = getVariableTemplateNames(selectedServerUrl);
|
|
364
364
|
varNames.forEach(vari => {
|
|
@@ -64392,10 +64392,10 @@ Swagger.prototype.applyDefaults = function applyDefaults() {
|
|
|
64392
64392
|
if (!spec.basePath) {
|
|
64393
64393
|
spec.basePath = '/';
|
|
64394
64394
|
}
|
|
64395
|
-
} else if ((0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_16__.isOpenAPI3)(spec)
|
|
64396
|
-
if (!spec.servers) {
|
|
64395
|
+
} else if ((0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_16__.isOpenAPI3)(spec)) {
|
|
64396
|
+
if (!spec.servers || Array.isArray(spec.servers) && spec.servers.length === 0) {
|
|
64397
64397
|
spec.servers = [{
|
|
64398
|
-
url:
|
|
64398
|
+
url: '/'
|
|
64399
64399
|
}];
|
|
64400
64400
|
}
|
|
64401
64401
|
}
|