Skip to content

Commit

Permalink
fix(openapi): Cannot read property 'additionalProperties' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3k0 authored and moki committed Feb 13, 2023
1 parent 4e16be0 commit c0bd6c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/includers/batteries/openapi/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function paths(spec: OpenapiSpec, tagsByID: Map<string, Tag>): Specification {
if (response.content) {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
parsed.schemas = Object.entries<{[key: string]: any}>(response.content)
.map(([type, schema]) => ({type, schema: schema.schema}));
.map(([type, schema]) => ({type, schema: schema?.schema || {}}));
}

return parsed as Response;
Expand Down

0 comments on commit c0bd6c6

Please sign in to comment.