Skip to content

Commit

Permalink
Ensure qualifiers are rendered for polymorphic/primitive properties (#…
Browse files Browse the repository at this point in the history
…765)

* ensure qualifiers are rendered for polymorphic properties

* update createSchema test
  • Loading branch information
sserrata committed Mar 21, 2024
1 parent f28711e commit d7bbe20
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ Array [
Array [
</div>
</li>
<div
style={{
marginTop: \\".5rem\\",
marginBottom: \\".5rem\\",
marginLeft: \\"1rem\\",
}}
>
<div style={{ marginTop: \\".5rem\\", marginBottom: \\".5rem\\" }}>
string
</div>
<li>
Expand All @@ -57,35 +51,17 @@ Array [
</li>
</TabItem>
<TabItem label={\\"MOD3\\"} value={\\"2-item-properties\\"}>
<div
style={{
marginTop: \\".5rem\\",
marginBottom: \\".5rem\\",
marginLeft: \\"1rem\\",
}}
>
<div style={{ marginTop: \\".5rem\\", marginBottom: \\".5rem\\" }}>
boolean
</div>
</TabItem>
<TabItem label={\\"MOD4\\"} value={\\"3-item-properties\\"}>
<div
style={{
marginTop: \\".5rem\\",
marginBottom: \\".5rem\\",
marginLeft: \\"1rem\\",
}}
>
<div style={{ marginTop: \\".5rem\\", marginBottom: \\".5rem\\" }}>
number
</div>
</TabItem>
<TabItem label={\\"MOD5\\"} value={\\"4-item-properties\\"}>
<div
style={{
marginTop: \\".5rem\\",
marginBottom: \\".5rem\\",
marginLeft: \\"1rem\\",
}}
>
<div style={{ marginTop: \\".5rem\\", marginBottom: \\".5rem\\" }}>
string
</div>
</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,18 @@ export function createNodes(
style: {
marginTop: ".5rem",
marginBottom: ".5rem",
marginLeft: "1rem",
},
children: createDescription(schema.type),
children: [
createDescription(schema.type),
guard(getQualifierMessage(schema), (message) =>
create("div", {
style: {
paddingTop: "1rem",
},
children: createDescription(message),
})
),
],
});
}

Expand All @@ -829,9 +838,18 @@ export function createNodes(
style: {
marginTop: ".5rem",
marginBottom: ".5rem",
marginLeft: "1rem",
},
children: [createDescription(schema)],
children: [
createDescription(schema),
guard(getQualifierMessage(schema), (message) =>
create("div", {
style: {
paddingTop: "1rem",
},
children: createDescription(message),
})
),
],
});
}

Expand Down

0 comments on commit d7bbe20

Please sign in to comment.