davsclaus opened a new pull request, #27486: URL: https://github.com/apache/camel/pull/27486
## Description https://issues.apache.org/jira/browse/CAMEL-25411 The source editor validated a YAML file with the YAML DSL schema (which knows the Kamelet envelope), the endpoint checks and the simple checks. It did not run the Kamelet checks that `camel_validate_source` runs. I checked this with the custom Kamelet a local model wrote in the Kamelet side check of the benchmark (`tag-order-action`): | Case | AI tools | Source editor before | |---|---|---| | `properties:` directly under `spec` | error | nothing | | template `from: kamelet:tag-order-action` (itself) | error | nothing | | route with `tagg:` for `tag`, the required `tag` left out | 2 errors, read from the project's Kamelet file | nothing | | `camel:timer` the template does not use | note | nothing | The editor now runs the same checks: - **The shape of a `.kamelet.yaml`** (`KameletChecks.validateKameletFile`), and **the `kamelet:` endpoints** of any YAML file (`KameletChecks.validateYaml`). The endpoints are checked against the catalog and the Kamelet files in the file's directory. A Kamelet that is not written yet is not reported, as on a write. - They are marked on load, while typing and on save. - On save, they keep the file from being saved, as the other problems of a YAML file do. - **The dependency notes** of a Kamelet file (CAMEL-25403) are marked and said when the file is saved. They do not block the save, in the same way as the problems of a Java route. - **In a Kamelet's template**, a Simple error for `${header.tag}` gets the hint that the property is the placeholder `{{tag}}` (`KameletChecks.withTemplateHints`). ## Tests `SourceKameletValidationTest`: - the checks of a Kamelet file; - a route checked against the project's Kamelet file; - a Kamelet with a problem: marked on load, and not saved; - an unused dependency: marked, and the file saved with the note said. The camel-jbang-plugin-tui module: 1748 tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
