Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20853

Rest DSL - Rest routes can not be grouped anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.6.0
    • 4.7.0
    • came-core
    • None
    • Java 21; Ubuntu/Windows/Debian;

    • Unknown

    Description

      A fully functional demo project was created and published on [GitHub|https://github.com/me0x847206/issue-camel].

      The issue can be seen as part of the following rest route configuration code:

       

              onException(RuntimeException.class)
                      .handled(true)
                      .transform()
                      .constant("<message>Exception!</message>");
              rest("/say")
                      .get("/bye")
                      .to("direct:bye");
              from("direct:bye")
                      .group("API")
                      .transform()
                      .constant("<message>Bye World!</message>");
      

       

      Because of the presence of the onException section, the rest:get:/say:/bye rest route does not belong to the API group.

      If the onException part is removed then, the rest:get:/say:/bye rest route becomes part of the API group as expected (and as it worked on previous versions).

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            me0x847206 Teodor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: