swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[spring] descriptions for requestBody do not seem to generate properly

Open Jdonn1995 opened this issue 6 years ago • 0 comments

Description

an example of a path I have in my yaml is

paths:
  /shipment/create:
    post:
     description: |
        ## This call will create a shipment
      requestBody:
        description: | 
          **Required information**
          ---
          > * Information 1
          > * Information 2
          > * Information 3
          > * Information 4
          ---

and how that gets generated in the Api interface is

ResponseEntity<Object> createShipment(@ApiParam(value = "**Required information**
---
> * Information 1
> * Information 2
> * Information 3
> * Information 4
---
" ,required=true )  @Valid @RequestBody ShipmentBasicInfoResponse body);

This will obviously not work without reformatting it to

ResponseEntity<Object> createShipment(@ApiParam(value = "**Required information** --- > * Information 1 > * Information 2 > * Information 3 > * Information 4 --- " ,required=true )  @Valid @RequestBody ShipmentBasicInfoResponse body);

This is being generated through swaggerhub. The only codegen option that has been changed was hideGenerationTimestamp = true.

Jdonn1995 avatar Dec 05 '19 14:12 Jdonn1995