CAMEL-23863: Fix invalid YAML in rest-api example#68
Merged
Conversation
davsclaus
approved these changes
Jun 30, 2026
The rest DSL block nested the GET verbs under an unsupported `steps:` key, which the Camel YAML DSL rejects at parse time. Use the proper `get:` verb list with explicit `to:` targets wiring each verb to its direct route, matching the canonical Camel YAML rest DSL structure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ammachado
force-pushed
the
CAMEL-23863-fix-rest-api-yaml
branch
from
July 1, 2026 03:32
74cc20d to
3410363
Compare
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.
Motivation
The
rest-apiexample'srest-api.camel.yamlnests the GET verbs under an unsupportedsteps:key:The Camel YAML DSL has no
steps:child underrest:; verbs belong directly underget:/post:/etc. As a result the example fails at parse time (UnsupportedFieldException) andcamel run --example=rest-apidoes not start.Fix
Use the proper
get:verb list with explicitto:targets wiring each verb to itsdirectroute, matching the canonical Camel YAML rest DSL structure:The two
direct:hello/direct:hello-nameroutes already present in the file remain unchanged.Related
This is the upstream source for the bundled example that is synced into
apache/camelvia thesync-example-catalogMaven profile. The same fix has been applied on the camel side, together with a newExampleRoutesLoadTestthat loads and parses every bundled example through the routes loader to prevent this class of regression:Without this upstream change, the next example-catalog sync would re-introduce the broken file.
Claude Code on behalf of Adriano Machado