on 2018 Feb 14 4:59 PM
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?
Request clarification before answering.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, Could you please share the solution here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.