Add anchor resolution + combinator resolution to fix Zowe 3.3 schema error#278
Merged
1000TurquoisePogs merged 2 commits intov3.x/stagingfrom Sep 29, 2025
Merged
Add anchor resolution + combinator resolution to fix Zowe 3.3 schema error#2781000TurquoisePogs merged 2 commits intov3.x/stagingfrom
1000TurquoisePogs merged 2 commits intov3.x/stagingfrom
Conversation
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); |
Member
Author
There was a problem hiding this comment.
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]; |
Member
Author
There was a problem hiding this comment.
Check that this method makes a decision based on different types of objects covered by combinator
1000TurquoisePogs
approved these changes
Sep 29, 2025
Member
1000TurquoisePogs
left a comment
There was a problem hiding this comment.
I reviewed this with @DivergentEuropeans and it looks like a good improvement for keeping compat with current and future v2 and v3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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