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

Input always a drop-down

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.16.2
    • 2.17.0
    • camel-swagger
    • None
    • Unknown

    Description

      The json below contains an empty enum:

      swagger.json
      parameters: [
        {...
          name: "customerId",
          in: "path",
          description: "The customer ID/RCIF number.",
          required: true,
          type: "string",
          enum: [ ]
        }
      ],...
      

      But the Camel Code below code has no "allowableValues":

      camel.java
      rest(baseUrl)
          //--------Swagger Documentation--------
          .description("Retrieve Customer based on ID number")
          .produces(MediaType.APPLICATION_JSON_VALUE)
        .get("/{customerId}")
          //--------Swagger Documentation--------
          .param().name("customerId").type(RestParamType.path).description("The customer IDnumber.").required(true).dataType("string").endParam()
        .route()...;
      

      This empty enum value forces the UI to produce an empty uneditable drop-down, when it should be a text-box.

      Based on the latest master branch of https://github.com/swagger-api/swagger-ui

      Attachments

        Activity

          People

            Unassigned Unassigned
            flavouski Flavel Heyman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: