Skip to content

feat: add dependentSchemas keyword handler#241

Draft
vanshaj2023 wants to merge 1 commit into
ioflux-org:mainfrom
vanshaj2023:feat/dependent-schemas-handler
Draft

feat: add dependentSchemas keyword handler#241
vanshaj2023 wants to merge 1 commit into
ioflux-org:mainfrom
vanshaj2023:feat/dependent-schemas-handler

Conversation

@vanshaj2023

Copy link
Copy Markdown
Contributor

Summary

Implements the dependentSchemas keyword handler in processAST.ts.

The keyword was previously commented out, causing it to fall back to fallbackHandler and display a "not implemented" warning node. This PR adds a proper handler that recursively creates child nodes for each dependent subschema.

The handler was designed by tracing Hyperjump's source (lib/keywords/dependentSchemas.js) — dependentSchemas compiles via asyncCollectArray, producing [string, string][] tuples of [propertyName, schemaUri]. The property name is used as childId (not a numeric index like patternProperties) so source handles are meaningful, consistent with the properties handler convention.

What kind of change does this PR introduce

New feature — adds a missing keyword handler

Issue Number

Closes #

Screenshots/Video

Schema used for testing:

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "credit_card": { "type": "string" }
  },
  "dependentSchemas": {
    "credit_card": {
      "properties": { "billing_address": { "type": "string" } },
      "required": ["billing_address"]
    }
  }
}
image

Does this PR introduce a breaking change?

No

If relevant, did you update the documentation?

No

@adityayadav-dev

adityayadav-dev commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Hey @vanshaj2023, since this also falls under the GSoC qualification tasks, I believe it's intended to be part of the proposal rather than a PR—as mentioned in the task description. Opening a PR at this stage might create some unnecessary overhead for the maintainers. Thanks!

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