Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2980

Provide all the content-types lists in swagger UI if consumes wildcard

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.7.6.GA
    • smallrye-openapi
    • ---

      We are defining Camel-REST configuration with swagger. We are consuming an external REST service witch allows multiple content-type but not limited. We are requested to passes through all the content-type to the service, they can either handle or reject the request with appropriate response. We do not know/have any control over all the supported content-types. So we can specify either a wildcard

      "*/*"

      or a reserved key word as "all". The swagger UI supposed to list all the content-types, then the user can able to choose one from the list along with body.

      Current behavior:
      3]With body param and with wildcard consumes option – swagger UI does not show all the valid options available to choose from but it shows as-is the option specified ie (wildcard "/").  - requirement is to show  all the available content-types in swagger UI.

      Swagger UI does not show all available options to choose from

      <post uri="/v1/applications" consumes="*/*">
              <description>Create Application</description>
              <param name="body" type="body" description="The application to be created" />
              <to uri="direct:create-application-uri" />
      </post>  

      We think that the swagger is used during development/design time and runtime. If we able to produce a valid API schema from the REST service, It can be invoked throw a swagger-UI irrespective of phase.

            rhn-sa-tqvarnst Thomas Qvarnström
            rhn-support-xiwu Xiaohui Wu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: