You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Vladimír Váša (Jira)" <ji...@apache.org> on 2021/02/11 18:41:00 UTC
[jira] [Created] (CAMEL-16187) camel-restdsl-openapi-plugin -
generate operationId enumeration
Vladimír Váša created CAMEL-16187:
-------------------------------------
Summary: 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
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.3.4#803005)