Skip to content

fix(frontend): use nested schema required fields - #8003

Open
anthonychengit wants to merge 1 commit into
apache:mainfrom
anthonychengit:fix/nested-autofill-requiredness
Open

fix(frontend): use nested schema required fields#8003
anthonychengit wants to merge 1 commit into
apache:mainfrom
anthonychengit:fix/nested-autofill-requiredness

Conversation

@anthonychengit

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Nested autofill properties now determine requiredness from the JSON Schema object that directly owns the property.

Before After
Required property in a $ref definition Could receive an invalid empty option Receives only propagated attribute names
Optional nested property sharing a root-level name Could lose its empty option Retains the empty option

DynamicSchemaService.mutateProperty supplies the owning schema to its match and mutation callbacks. WorkflowCompilingService uses that schema's required array when constructing autofill enums.

Any related issues, documentation, discussions?

Closes #7826.

How was this PR tested?

Added positive and negative regression coverage for required and optional nested properties, plus callback coverage for the owning schema.

cd frontend
node node_modules\@angular\cli\bin\ng.js test --watch=false --include src/app/workspace/service/dynamic-schema/dynamic-schema.service.spec.ts --include src/app/workspace/service/compile-workflow/workflow-compiling.service.spec.ts

Result: 2 test files passed; 62 tests passed.

cd frontend
node .yarn\releases\yarn-4.14.1.cjs run format:ci
git diff --check

Result: both commands completed successfully.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex was used for implementation and verification assistance. I reviewed the final code and test output before submission.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Aug 26, 2026
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Aug 26, 2026
@github-actions
github-actions Bot requested a review from xuang7 August 26, 2026 19:53
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. Requested review from @xuang7.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @kunwp1
    You can notify them by mentioning @aglinxinyuan, @kunwp1 in a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI release/v1.2 back porting to release/v1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autofill required-ness is read from the root schema, not the property's own level

2 participants