openapi-client-axios
Advanced tools
Comparing version 7.2.1 to 7.2.2
@@ -677,6 +677,7 @@ "use strict"; | ||
OpenAPIClientAxios.prototype.loadDocument = function () { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var client, documentRes, yaml, err; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
@@ -690,3 +691,3 @@ if (!(typeof this.inputDocument === 'object')) return [3 /*break*/, 1]; | ||
case 2: | ||
documentRes = _a.sent(); | ||
documentRes = _b.sent(); | ||
if (!(typeof documentRes.data === 'object')) return [3 /*break*/, 3]; | ||
@@ -697,6 +698,6 @@ // json response | ||
case 3: | ||
if (!(typeof documentRes.data === 'string' && ['text/yaml', 'application/yaml'].includes(documentRes.headers['content-type']))) return [3 /*break*/, 5]; | ||
if (!(typeof documentRes.data === 'string' && ((_a = documentRes.headers['content-type']) === null || _a === void 0 ? void 0 : _a.match(/ya?ml/)))) return [3 /*break*/, 5]; | ||
return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require('js-yaml')); })]; | ||
case 4: | ||
yaml = _a.sent(); | ||
yaml = _b.sent(); | ||
this.document = yaml.load(documentRes.data); | ||
@@ -703,0 +704,0 @@ return [3 /*break*/, 6]; |
{ | ||
"name": "openapi-client-axios", | ||
"description": "JavaScript client library for consuming OpenAPI-enabled APIs with axios. Types included.", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"license": "MIT", | ||
@@ -77,3 +77,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b0fb9ed206c223cad6f0e84927758dc6bd705146" | ||
"gitHead": "23fab730831137c3eb314948b09b7e43f27bd459" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73341
1091