Skip to content

Commit

Permalink
Docs reference: Fix bug with hidden array item properties (airbytehq#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Reuter authored and jatinyadav-cc committed Feb 21, 2024
1 parent 721e32d commit 562a2ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docusaurus/src/components/SpecSchema.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ function isObjectArray(schema) {
}

function showCollapsible(schema) {
return (schema.type === "array" && schema.items && schema.items.type !== "object") || (schema.type === "object" && schema.properties) || showDescription(schema)
return (schema.type === "object" && schema.properties) || showDescription(schema)
}

function showDescription(schema) {
return typeof schema.default !== "undefined" || schema.pattern || schema.examples || schema.description || isOneOf(schema);
return typeof schema.default !== "undefined" || schema.pattern || schema.examples || schema.description || isOneOf(schema) || (schema.type === "array" && schema.items && schema.items.type === "object");
}

function getIndentStyle(depth) {
Expand Down

0 comments on commit 562a2ab

Please sign in to comment.