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

Default value given in RestOperationParamDefinition not output in swagger api

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.16.1
    • Fix Version/s: 2.16.3, 2.17.0
    • Component/s: camel-swagger
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When I specify a default value in a rest param definition, the default value is not output in the swagger API. For example:

      rest().put("{accountNumber}")
        .param()
          .name("type")
          .type(RestParamType.query)
          .description("The type of account to update.")
          .defaultValue("MDM")
        .endParam()
        .to("direct:foo");
      

      Will output the following Swagger API fragment:

      {
      "name": "type",
      "in": "query",
      "description": "The type of account to update.",
      "required": true,
      "type": "string"
      }
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              jvz Matt Sicker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: