Skip to content

Commit

Permalink
fix: deprecated with empty schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
v8tenko committed Nov 13, 2024
1 parent 897fac1 commit 496f54f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/includer/ui/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ function response(visited: Set<string>, resp: V3Response) {
header += ` ${resp.statusText}`;
}

const isAllSchemasDeprecated = resp.schemas?.every(({schema}) => schema.deprecated);
const isAllSchemasDeprecated =
resp.schemas?.length && resp.schemas?.every(({schema}) => schema.deprecated);

return block([
`<div class="openapi__response__code__${resp.code}">`,
Expand Down

0 comments on commit 496f54f

Please sign in to comment.