[
https://issues.apache.org/jira/browse/CAMEL-16187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-16187:
--------------------------------
Fix Version/s: 4.x
(was: 3.x)
> camel-restdsl-openapi-plugin - generate operationId enumeration
> ---------------------------------------------------------------
>
> Key: CAMEL-16187
> URL: https://issues.apache.org/jira/browse/CAMEL-16187
> Project: Camel
> Issue Type: Improvement
> Components: tooling
> Affects Versions: 3.7.2
> Reporter: Vladimír Váša
> Priority: Minor
> Fix For: 4.x
>
>
> Hi,
> I discovered this great tool (camel-restdsl-openapi-plugin) two days ago.
> It's almost perfect. I have only one suggestion for improvement:
>
> Actually the plugin is generating "controller" like class with code similar
> to:
> {code:java}
> rest()
> .get("/somepath")
> .id("operationIdFromOpenAPI")
> .produces("application/json")
> .to("direct:operationIdFromOpenAPI");
> {code}
> And "user" can continue route with:
> {code:java}
> from(direct:operationIdFromOpenAPI)...
> {code}
>
> Problem:
> The problem occurs during the change operationId in next version of OpenAPI
> definition. It have to be manually checked.
>
> Improvement:
> It would be very nice if the plugin generated an enum of operationIds from
> the OpenAPI definition. Something like:
> {code:java}
> public enum ApiOperation {
> OPERATION_ID_1("operationId1"),
> ANOTHER_OPERATION_ID("anotherOperationId");
> private final String value;
> // ... constructor, toString...{code}
>
> And route with:
> {code:java}
> ...to("direct:" + ApiOperation.OPERATION_ID_1);
> {code}
> With best regards
> Vladimir
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)