Skip to content

Feat : Move def to the root node - #382

Open
itvi-1234 wants to merge 1 commit into
ioflux-org:mainfrom
itvi-1234:inline-defs
Open

itvi-1234 wants to merge 1 commit into
ioflux-org:mainfrom
itvi-1234:inline-defs

Conversation

@itvi-1234

@itvi-1234 itvi-1234 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
image

Signed-off-by: itvi-1234 <rjsumit71@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployed!

Item Status
Latest Deploy Visit Preview
Environment Preview (PR-382)
Action View Logs

Last updated at 2026-07-27T18:26:33Z

@itvi-1234

Copy link
Copy Markdown
Contributor Author

cc @AgniveshChaubey @jagpreetrahi

@AgniveshChaubey AgniveshChaubey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, right now, defs nodes are processed at the very beginning, which is why the defs keywords in the parent node and the defs-related child nodes are rendered first. We'll need to figure out a way to place them in the bottom half of the canvas even though they're processed early. We have to also keep in mind that on the backend, processing defs nodes early on is required, because they'll be referenced by other nodes later. We just need to adjust the placement of the defs keywords in parent node and defs nodes on canvas.

Comment thread src/utils/processAST.ts
}
return { key: "$defs", data: { value: shortNames.map(n => `def-${n}`) } }
},
"https://json-schema.org/keyword/$defs": (ast, keywordValue, nodes, edges, parentId, nodeDepth, renderedNodes) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need https://json-schema.org/keyword/$defs handler if we dont want to render a separate $defs node?

This branch was successfully deployed

1 active deployment
pr-preview-382 06ea2751 Deployed Jul 27, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants