Skip to content

Add anchor resolution + combinator resolution to fix Zowe 3.3 schema error#278

Merged
1000TurquoisePogs merged 2 commits intov3.x/stagingfrom
bugfix/fix-schema
Sep 29, 2025
Merged

Add anchor resolution + combinator resolution to fix Zowe 3.3 schema error#278
1000TurquoisePogs merged 2 commits intov3.x/stagingfrom
bugfix/fix-schema

Conversation

@DivergentEuropeans
Copy link
Copy Markdown
Member

@DivergentEuropeans DivergentEuropeans commented Sep 15, 2025

My 1 new sanitizer method successfully fixes both schema compile issues (1 in JsonForms component, 1 in our own AJV compile elsewhere ), introduced in Zowe V3.3. It is unclear if schema error is with Zowe versus Wizard's internal mishandling of old style & new style schema consolidation. You'll likely encounter it 1st on Installation stage, after upload step.

ERROR
reference "#zoweDataset" resolves to more than one schema at ambiguos (webpack-internal:///./node_modules/ajv/dist/compile/resolve.js:151:16) at Ajv2019.addRef (webpack-internal:///./node_modules/ajv/dist/compile/resolve.js:118:23) at Ajv2019.addAnchor (webpack-internal:///./node_modules/ajv/dist/compile/resolve.js:141:24) at eval (webpack-internal:///./node_modules/ajv/dist/compile/resolve.js:110:19) at _traverse (webpack-internal:///./node_modules/json-schema-traverse/index.js:69:5) at _traverse (webpack-internal:///./node_modules/json-schema-traverse/index.js:75:13) at _traverse (webpack-internal:///./node_modules/json-schema-traverse/index.js:80:13) at module.exports (webp0ack-internal:///./node_modules/json-schema-traverse/index.js:14:3) at Ajv2019.getSchemaRefs (webpack-internal:///./node_modules/ajv/dist/compile/resolve.js:103:5) at Ajv2019._addSchema (webpack-internal:///./node_modules/ajv/dist/core.js:451:51)

image

But, fixed. Problem is, the new schema that becomes successfully compiled is not correctly readable by the UI partially due to our custom methods. I now have resolve combinators method that takes into account Sakshi's existing code and pre-resolve combinators in the schema so JsonForms never sees oneOf/anyOf and doesnt duplicate tabs like in 1st screenshot

image

Signed-off-by: Leanid Astrakou <lastrakou@rocketsoftware.com>
Signed-off-by: Leanid Astrakou <lastrakou@rocketsoftware.com>
onChange(formData, schemaIndex);
}

const sanitizedSchema = resolveCombinators(sanitizeOldStyleAnchors(requiredSchema), formData);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A few sentences summary of overall AJV/schema context for this issue woudl be good


const choose = (schemasArray: any[], formData: any) => {
// Find the matching schema for the given form data or default to 0
return schemasArray[findMatchingSchemaIndex(formData ?? {}, schemasArray)] || schemasArray[0];
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Check that this method makes a decision based on different types of objects covered by combinator

Copy link
Copy Markdown
Member

@1000TurquoisePogs 1000TurquoisePogs left a comment

Choose a reason for hiding this comment

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

I reviewed this with @DivergentEuropeans and it looks like a good improvement for keeping compat with current and future v2 and v3.

@github-project-automation github-project-automation bot moved this from Ready for Review to Merge Ready in WebUI planning board Sep 29, 2025
@1000TurquoisePogs 1000TurquoisePogs merged commit 4ada4e9 into v3.x/staging Sep 29, 2025
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from Merge Ready to Closed in WebUI planning board Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants