cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to generate swagger documentation with each request object attribute will have required/optional as well as description?

Former Member
0 Kudos
659

How to generate swagger documentation with each request object attribute will have required /optional as well as description?

We are able to generate swagger documentation but with spring file doesn't accept required or description as part of xml , we are looking for a way to generate better documentation so that the swagger documentation is intutive.

Spring fox can generate required or optional based on @NotNull but since we are not using java DTO instead spring xml based DTO. How do we generate the required documentation?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI! Here's the solution:

     <bean class="de.hybris.platform.commercewebservicescommons.dto.product.ProductWsDTO">
         <import type="io.swagger.annotations.ApiModelProperty"/>
         <property name="testName" type="String">
             <description>Test name</description>
             <annotations scope="member">
                 @ApiModelProperty(value = "Test name", example="example value", required=true, allowEmptyValue=false)
             </annotations>
         </property>
     </bean>
Former Member
0 Kudos

hi, Could you please share the solution here?