davsclaus opened a new pull request, #27187:
URL: https://github.com/apache/camel/pull/27187
_Claude Code on behalf of davsclaus_
Many validation messages already say their fix: "Unknown option 'peroid'.
Did you mean: [period]", "use toD", "a property placeholder is written
{{key}}". This makes those fixes applicable.
### Core (camel-jbang-core)
`QuickFixes.fixFor(message, line)` turns the fix a problem says into a
replacement on its line. It works for any DSL (YAML, Java, XML), and only when
the fix is certain:
- an option that is a typo of another (uri `name=` or YAML key `name:`), and
a YAML schema property with a "did you mean";
- an enum value a letter or two off its one closest choice, and a boolean
value such as `tru`;
- a `to` whose uri holds `${...}`: `.to(` → `.toD(`, `<to` → `<toD`, `to:` →
`toD:`;
- a Simple expression `${key}` in an endpoint option where the property
placeholder `{{key}}` is meant.
### TUI Source editor
On a line whose problem has a fix, the Error panel shows `Shift+F9 fix: siz
→ size`, and **Shift+F9** applies it. **F9** already jumps to the next problem;
F3, F6 and F8 are global keys (switch integration, shell, AI panel). Ctrl+Z
takes the fix back, and the content is checked again right away.
### MCP
`camel_validate_source` returns `fixes` next to `errors`: the line, the text
to find and its replacement. An agent applies them as a `camel_edit_file` edit
instead of working the fix out, which helps small local models most.
Tested live in the TUI (`siz` → `size`, `to` → `toD`). New tests:
`QuickFixesTest` (end to end, from real validation messages in the three DSLs,
plus the MCP `fixes`) and `SourceQuickFixTest` (editor, undo).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]