Skip to content

Commit

Permalink
change order of priorities for schema def keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 23, 2024
1 parent 85757cf commit e10e0cd
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 11 deletions.
Binary file modified .cache.tar.xz
Binary file not shown.
117 changes: 113 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/main-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-svelte": "^3.2.6",
"sass": "^1.77.8"
"sass": "1.77.6"
}
}
2 changes: 1 addition & 1 deletion sites/main-site/src/components/schema/SchemaListing.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export let schema;
const schemaDefs = schema.definitions || schema.properties || schema.$defs;
const schemaDefs = schema.definitions || schema.$defs || schema.properties;
onMount(() => {
const observer = new IntersectionObserver(
(entries) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ if (existsSync(cache_key)) {
let schema_buffer = await promises.readFile(cache_key, 'utf-8');
schema = JSON.parse(schema_buffer);
}
console.log('pipeline: ', pipeline);
let schemaDefs =
schema.definitions && Object.keys(schema.definitions).length > 0
? schema.definitions
: schema.properties
? schema.properties
: schema.$defs;
console.log('schemaDefs: ', schemaDefs);
: schema.$defs && Object.keys(schema.$defs).length > 0
? schema.$defs
: schema.properties;
if (schemaDefs && Object.keys(schemaDefs).length > 0) {
headings = Object.entries(schemaDefs).map(([key, value]) => {
return {
Expand Down

0 comments on commit e10e0cd

Please sign in to comment.