Seems it doesn't work.
i try with below, the route seem name as routeX , ":     Started route4
(rest://get:/sample/)"

        rest("/sample/").id("rest-sample")
            .description("sample get api")
            .get()
            .bindingMode(RestBindingMode.auto)
            .to("direct:test");


Thanks and Regards,
Chio Chuan


On Wed, Jul 20, 2022 at 1:21 PM Chio Chuan Ooi <chioch...@gmail.com> wrote:

> Ok, let me try that out.
>
> Thanks and Regards,
> Chio Chuan
>
>
> On Wed, Jul 20, 2022 at 1:09 PM Zheng Feng <zf...@redhat.com> wrote:
>
>> like rest("/users/").id("rest_route_id")....
>>
>> On Wed, Jul 20, 2022 at 1:07 PM Zheng Feng <zf...@redhat.com> wrote:
>>
>> > Sorry, you want to set the route id of the rest route?
>> >
>> > On Wed, Jul 20, 2022 at 1:04 PM Zheng Feng <zf...@redhat.com> wrote:
>> >
>> >> Well, you can set route id in the direct router just like:
>> >>
>> >> rest("/users/")
>> >> .post("lives").type(UserPojo.class).outType(CountryPojo.class)
>> >> .to("direct:users-lives);
>> >>
>> >> from("direct:users-lives).routeId("id");
>> >>
>> >> On Wed, Jul 20, 2022 at 12:24 PM Chio Chuan Ooi <chioch...@gmail.com>
>> >> wrote:
>> >>
>> >>> Hi Zheng Feng,
>> >>>
>> >>> Noted with thanks. But for rest, it also created a route right? Is
>> that
>> >>> anyway to set the id for the route? We need the routeid for suspend
>> using
>> >>> controlbus
>> >>>
>> >>> Thanks and Regards,
>> >>> Chio Chuan
>> >>>
>> >>>
>> >>> On Tue, Jul 19, 2022 at 10:02 PM Zheng Feng <zf...@redhat.com> wrote:
>> >>>
>> >>> > Please check
>> >>> >
>> >>> >
>> >>>
>> https://camel.apache.org/manual/camel-3x-upgrade-guide-3_16.html#_removed_support_for_embedded_routes
>> >>> >
>> >>> > On Tue, Jul 19, 2022 at 8:49 PM Chio Chuan Ooi <chioch...@gmail.com
>> >
>> >>> > wrote:
>> >>> >
>> >>> > > Hi Mates,
>> >>> > >
>> >>> > > i used to create the rest route using below which we can set the
>> >>> routeid.
>> >>> > > But in the latest 3.18.0 version, the "route()" method is no
>> longer
>> >>> > > available, so I cannot set the route id for rest route.
>> >>> > >
>> >>> > > rest("/users/")
>> >>> > > .post("lives").type(UserPojo.class).outType(CountryPojo.class)
>> >>> > > .route().routeId("test");
>> >>> > >
>> >>> > > Any advice on how to set the routeid for rest route?
>> >>> > >
>> >>> > > Thanks and Regards,
>> >>> > > Chio Chuan
>> >>> > >
>> >>> >
>> >>>
>> >>
>>
>

Reply via email to