[
https://issues.apache.org/jira/browse/CAMEL-13909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-13909:
--------------------------------
Fix Version/s: 4.x
(was: 3.x)
> Camel Rest-DSL doesn't generate type & outType from openapi 2.0 file
> --------------------------------------------------------------------
>
> Key: CAMEL-13909
> URL: https://issues.apache.org/jira/browse/CAMEL-13909
> Project: Camel
> Issue Type: Improvement
> Components: rest, tooling
> Reporter: Hari Rao
> Priority: Major
> Fix For: 4.x
>
>
> In the camel-swagger-rest-dsl-generator project, it is not generating .type &
> .outType rest dsl though available as part of openapi 2.0 (swagger) spec.
> This is because in (as far as I investigated) in
> org.apache.camel.generator.swagger.OperationVisitor class we have the
> following code and beyond we do not have options to emit type & outType.
> Besides in the method, it is also not possible to pass User defined objects
> which will help to create those models.
> {code:java}
> void visit(final HttpMethod method, final Operation operation) {
> if (filter.accept(operation.getOperationId())) {
> final String methodName = method.name().toLowerCase();
> emitter.emit(methodName, path);
> emit("id", operation.getOperationId());
> emit("description", operation.getDescription());
> emit("consumes", operation.getConsumes());
> emit("produces", operation.getProduces());{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)