title: Swagger Param Documentation
body: <p><strong>Current State:</strong></p>
  
  <p>I have two methods in my controller to get data based on what parameters are passed.  The code:</p>
  
  <pre><code>@RestController
  @RequestMapping("/samples")
  public class SampleController {
  
      @RequestMapping(value = "/{id}", params = {"cost"}, method = RequestMethod.GET)
      public String getSamplesByIdAndCost(@PathVariable String id, @RequestParam(value = "cost") String cost) {
          return "result";
      }
  
      @RequestMapping(value = "/{id}", params = {"cost", "size"}, method = RequestMethod.GET)
      public String getSamplesByIdCostAndSize(@PathVariable String id, @RequestParam(value = "cost") String cost,
                                          @RequestParam(value = "size") String size) {
      return "ID : " + id + " / COST : " + cost + " / SIZE : " + size;
      }
  }
  </code></pre>
  
  <p>Everything works fine, but the swagger documentation is not what I expected.</p>
  
  <p><a href="https://i.stack.imgur.com/03dOC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/03dOC.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/tNjPE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tNjPE.png" alt="enter image description here"></a></p>
  
  <p><strong>Question</strong></p>
  
  <p>Is there a way to remove {?size,cost} from the Request URL?</p>
  
  <p>Here is my Docket info:</p>
  
  <pre><code>@Bean
      public Docket myApi() {
          return new Docket(DocumentationType.SWAGGER_2)
                  .select()
                  .apis(RequestHandlerSelectors.any())
                  .paths(PathSelectors.any())
                  .build()
                  .pathMapping("/")
                  .directModelSubstitute(LocalDate.class,
                          String.class)
                  .genericModelSubstitutes(ResponseEntity.class)
                  .alternateTypeRules(
                          newRule(typeResolver.resolve(DeferredResult.class,
                                  typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
                                  typeResolver.resolve(WildcardType.class)))
                  .useDefaultResponseMessages(false)
                  .globalResponseMessage(RequestMethod.GET,
                          newArrayList(new ResponseMessageBuilder()
                                  .code(500)
                                  .message("500 message")
                                  .responseModel(new ModelRef("Error"))
                                  .build()))
                  .enableUrlTemplating(true);
  
      }
  
      @Autowired
      TypeResolver typeResolver;
  
      @Bean
      UiConfiguration uiConfig() {
          return new UiConfiguration(
                  "validatorUrl",// url
                  "none",       // docExpansion          =&gt; none | list
                  "alpha",      // apiSorter             =&gt; alpha
                  "schema",     // defaultModelRendering =&gt; schema
                  UiConfiguration.Constants.DEFAULT_SUBMIT_METHODS,
                  false,        // enableJsonEditor      =&gt; true | false
                  true);        // showRequestHeaders    =&gt; true | false
      }
  </code></pre>