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

Duplicate contextpath for OpenAPI Spec in exported Camel Project

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • fuse-7.4-GA
    • fuse-7.7-GA
    • Apicurito
    • None
    • fuse-7.7-build6
    • Hide

      use the attached example

      Show
      use the attached example

    Description

      When exporting from apicurio studio as a Fuse / Camel project

      The camel route generated has two duplicated contextpath. There is one for the apiContext and one as a get method. If we are reading from the project json file then remove the app context attribute.

      This causes a NullPointer exception in the Swagger component and thous not rendering the openapi.json spec.

      <rest id="rest-for-openapi-document" path="/" enableCORS="true">
              <get id="openapi.json" produces="application/json" uri="openapi.json">
                  <description>Gets the OpenAPI document for this service</description>
                  <route id="route-for-openapi-document">
                      <setHeader id="setHeader-for-openapi-document" headerName="Exchange.CONTENT_TYPE">
                          <constant>application/vnd.oai.openapi+json</constant>
                      </setHeader>
                      <setBody id="setBody-for-openapi-document">
                          <constant>resource:classpath:openapi.json</constant>
                      </setBody>
                  </route>
              </get>
          </rest>
      

      Attachments

        Activity

          People

            atarocch@redhat.com Andrea Tarocchi
            hguerrer Hugo Guerrero
            Juri Solovjov Juri Solovjov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: