Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-12576

Missing support for server variables in OpenAPI 3.x

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • fuse-7.6-CR7, fuse-7.7-GA
    • fuse-7.6-GA
    • Camel
    • None

    Description

      OpenAPI 3.x is able to use variables in server URLs as described in the OpenAPI specification.

      {
        "servers": [
          {
            "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
            "description": "The production API server",
            "variables": {
              "username": {
                "default": "demo",
                "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
              },
              "port": {
                "enum": [
                  "8443",
                  "443"
                ],
                "default": "8443"
              },
              "basePath": {
                "default": "v2"
              }
            }
          }
        ]
      }
      

      The Camel REST openapi components need to resolve these variables in server URLs. Especially the openapi-restdsl-generator component when extracting the base path from server URLs (something like

      {scheme}://{host}/{basePath}
      

      is also possible).

      Attachments

        Issue Links

          Activity

            People

              yfang@redhat.com Freeman(Yue) Fang
              christoph.deppisch Christoph Deppisch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: