Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
Improve block readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mpotomin authored and fabien0102 committed Feb 4, 2020
1 parent 77f316b commit ab65d3e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/scripts/import-open-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,19 @@ export const getResReqTypes = (

if (isReference(res)) {
return getRef(res.$ref);
} else {
if (res.content) {
for (let contentType of Object.keys(res.content)) {
if (contentType.startsWith("application/json") || contentType.startsWith("application/octet-stream")) {
const schema = res.content[contentType].schema!;
return resolveValue(schema);
}
}

if (res.content) {
for (let contentType of Object.keys(res.content)) {
if (contentType.startsWith("application/json") || contentType.startsWith("application/octet-stream")) {
const schema = res.content[contentType].schema!;
return resolveValue(schema);
}
return "void";
} else {
return "void";
}
return "void";
}

return "void";
}),
).join(" | ");

Expand Down

0 comments on commit ab65d3e

Please sign in to comment.