Unverified Commit 0048715a authored by sean1025's avatar sean1025 Committed by GitHub

Merge pull request #1893 from lifeixiang027/master

解决无法解析OpenAPI 3.0接口response问题
parents 1e71c176 1334fdd2
......@@ -26,6 +26,22 @@ const compareVersions = require('compare-versions');
) {
Object.assign(res, res.content['application/json']);
delete res.content;
}
if (
res.content &&
res.content['application/hal+json'] &&
typeof res.content['application/hal+json'] === 'object'
) {
Object.assign(res, res.content['application/hal+json']);
delete res.content;
}
if (
res.content &&
res.content['*/*'] &&
typeof res.content['*/*'] === 'object'
) {
Object.assign(res, res.content['*/*']);
delete res.content;
}
});
if (api.requestBody) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment