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

Default value given in RestOperationParamDefinition not output in swagger api

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16.1
    • 2.16.3, 2.17.0
    • camel-swagger
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment