-
Notifications
You must be signed in to change notification settings - Fork 45
chore: Remove Ajv and Update form related dependencies #2342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9aba0ba to
d8b9588
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2342 +/- ##
==========================================
+ Coverage 81.10% 81.16% +0.05%
==========================================
Files 452 452
Lines 14360 14339 -21
Branches 3126 3123 -3
==========================================
- Hits 11647 11638 -9
+ Misses 2711 2699 -12
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes AJV-based schema validation in favor of shared form utilities and updates related dependencies.
- Replaces manual AJV validators with
ModelValidationServiceorgetValidatorin visualization entities - Cleans up unused imports and deprecated validator functions
- Bumps
@kaoto/forms, removesajv/ajv-formats, updates PatternFly peer versions, and moves type packages to devDependencies
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/ui/src/models/visualization/flows/camel-route-configuration-visual-entity.ts | Switched to ModelValidationService.validateNodeStatus, removed AJV setup and imports, updated method signature |
| packages/ui/src/models/visualization/flows/camel-rest-configuration-visual-entity.ts | Replaced custom AJV compile with getValidator from @kaoto/forms, removed old validation helper |
| packages/ui/package.json | Bumped @kaoto/forms and PatternFly versions, removed ajv/ajv-formats, relocated type definitions to devDependencies |
Comments suppressed due to low confidence (2)
packages/ui/src/models/visualization/flows/camel-route-configuration-visual-entity.ts:127
- The signature of getNodeValidationText was changed; ensure it matches the overridden method in the base class or interface to avoid potential breaking overrides.
getNodeValidationText(path?: string | undefined): string | undefined {
packages/ui/package.json:80
- Bumping peerDependencies for PatternFly from ^6.1.0 to ^6.2.0 may introduce breaking changes for consumers; verify compatibility and update documentation or migration guides as needed.
"@patternfly/patternfly": "^6.2.0",
| if (!this.schemaValidator) { | ||
| this.schemaValidator = this.getValidatorFunction(componentVisualSchema); | ||
| this.schemaValidator = getValidator<RestConfiguration>(componentVisualSchema.schema, { useDefaults: 'empty' }); | ||
| } |
Copilot
AI
Jul 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider unifying the schema validation approach with ModelValidationService (as used in CamelRouteConfigurationVisualEntity) for consistency and easier maintenance.
d8b9588 to
881d409
Compare
881d409 to
5836ed8
Compare
|
No description provided.