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

openapi-rest-dsl-generator not considering path parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.2.0
    • tooling
    • None
    • Unknown

    Description

      The openapi-rest-dsl-generator doesn't generate a parameter configuration for parameters that are given on a path rather than on a operation.

      For example for this OpenAPI document:

      {
          "openapi": "3.0.2",
          "info": {
              "title": "Test API",
              "version": "1.0.0",
              "description": "A brand new API with no content.  Go nuts!"
          },
          "paths": {
              "/test/{myparam}": {
                  "get": {
                      "responses": {
                          "200": {
                              "description": "response"
                          }
                      },
                      "operationId": "op"
                  },
                  "parameters": [
                      {
                          "$ref": "#/components/parameters/MyParam"
                      }
                  ]
              }
          },
          "components": {
              "parameters": {
                  "MyParam": {
                      "name": "myparam",
                      "in": "path",
                      "required": true
                  }
              }
          }
      }
      

      There is no <param> tag in XML DSL:

      <?xml version="1.0" encoding="UTF-8"?><rests xmlns="http://camel.apache.org/schema/spring"><restConfiguration component="servlet"/>
          <rest>
              <get id="op" uri="/test/{myparam}">
                  <to uri="direct:op"/>
              </get>
          </rest>
      </rests>
      

      Attachments

        Activity

          People

            zregvart Zoran Regvart
            zregvart Zoran Regvart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: