[
https://issues.apache.org/jira/browse/CAMEL-18628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627114#comment-17627114
]
Claus Ibsen commented on CAMEL-18628:
-------------------------------------
If a rest endpoint is disabled should it then be included in the swagger doc?
Or should it be present, but if the endpoint is invoked then it does a noop
operation.
So in the /api/hello then when disabled then if invoked then Camel will just
return HTTP 204.
Or should we not include it, and if you attempt to invoke it, you get a 404.
> rest-dsl to support autoStartup
> -------------------------------
>
> Key: CAMEL-18628
> URL: https://issues.apache.org/jira/browse/CAMEL-18628
> Project: Camel
> Issue Type: Improvement
> Components: came-core
> Affects Versions: 3.19.0
> Reporter: Tuomas Palenius
> Priority: Minor
>
> Allowing to define _autoStartup_ in the rest-dsl:
> 1) On the top-level:
>
> {code:java}
> rest("/api")
> .autoStartup(true)
> .get("...")
> .get("..."){code}
>
> Would allow to create chunks of apis that could be enabled/disabled from the
> configuration (my use-case). The workaround now is to define the endpoints as
> plain routes.
> 2) On a particular verb-level:
> {code:java}
> rest("/api")
> .get("/hello").autoStartup(false).to(...){code}
> Would allow to enable/disable a single route by using rest-dsl.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)