Skip to content

Commit

Permalink
fix: setting additionalProperties no longer fail generation (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored May 3, 2021
1 parent 4c6cf30 commit 87b64ef
Show file tree
Hide file tree
Showing 3 changed files with 13,775 additions and 57 deletions.
2 changes: 1 addition & 1 deletion components/Schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function SchemaProp({ prop, propName, required = false, path = '', description =
}
});

const additionalProperties = prop.additionalProperties() && prop.additionalProperties().properties()
const additionalProperties = prop.additionalProperties() && typeof prop.additionalProperties() === "object" && prop.additionalProperties().properties()
? Object.entries(prop.additionalProperties().properties()).map(([pName, p]) => (
<SchemaProp prop={p} propName={pName} path={buildPath(path || propName, pName)} required={isRequired(prop.additionalProperties(), pName)} />
)) : null;
Expand Down
Loading

0 comments on commit 87b64ef

Please sign in to comment.