Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13909

Camel Rest-DSL doesn't generate type & outType from openapi 2.0 file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.5.0
    • rest, tooling
    • None
    • Unknown

    Description

      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.

      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());

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              hari87 Hari Rao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: