Skip to content

Commit e2fb491

Browse files
committed
fix: true/false display
1 parent cd0387d commit e2fb491

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/JSONSchema/SchemaRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const SchemaRenderer: React.FC<IProps> = ({ schema, required, name }) => {
140140
color: colorMap[schema.type as any],
141141
}}>{schema.type}</TableCell>
142142
<TableCell style={styles.cellWidth}>{schema.pattern}</TableCell>
143-
<TableCell style={styles.cellWidth}>{required ? "yes" : ""}</TableCell>
143+
<TableCell style={styles.cellWidth}>{required ? "true" : "false"}</TableCell>
144144
<TableCell style={styles.cellWidth}>{schema.description}</TableCell>
145145
</TableRow>
146146
);

src/JSONSchema/fields/JSONSchemaFields.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ it("renders with a schema required", () => {
5454
],
5555
} as JSONSchema4;
5656
ReactDOM.render(<JSONSchemaFields schema={schema} />, div);
57-
expect(div.innerHTML.includes("required")).toBe(true);
57+
expect(div.innerHTML.includes("true")).toBe(true);
5858

5959
ReactDOM.unmountComponentAtNode(div);
6060
});
@@ -69,7 +69,7 @@ it("renders with a schema without required", () => {
6969
},
7070
} as JSONSchema4;
7171
ReactDOM.render(<JSONSchemaFields schema={schema} />, div);
72-
expect(div.innerHTML.includes("optional")).toBe(true);
72+
expect(div.innerHTML.includes("false")).toBe(true);
7373
ReactDOM.unmountComponentAtNode(div);
7474
});
7575

0 commit comments

Comments
 (0)