Description
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:
rest() .get("/somepath") .id("operationIdFromOpenAPI") .produces("application/json") .to("direct:operationIdFromOpenAPI");
And "user" can continue route with:
from(direct:operationIdFromOpenAPI)...
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:
public enum ApiOperation { OPERATION_ID_1("operationId1"), ANOTHER_OPERATION_ID("anotherOperationId"); private final String value; // ... constructor, toString...
And route with:
...to("direct:" + ApiOperation.OPERATION_ID_1);
With best regards
Vladimir