Skip to content

Commit

Permalink
fix: Type first
Browse files Browse the repository at this point in the history
  • Loading branch information
taorepoara committed Feb 28, 2023
1 parent 36b1796 commit 669f876
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/components/propertyTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function getSortedPropertyKeys(schema) {
const required = schema.required || [];
return Object.keys(schema.properties)
.sort((prop1, prop2) => {
if (prop1=="type") return -1;
if (prop2=="type") return 1;
if (schema.properties[prop1].deprecated && !schema.properties[prop2].deprecated) return 1;
if (!schema.properties[prop1].deprecated && schema.properties[prop2].deprecated) return -1;
if (required.includes(prop1) && !required.includes(prop2)) return -1;
Expand Down

0 comments on commit 669f876

Please sign in to comment.