Forum Discussion

anuraganand's avatar
anuraganand
New Member
5 years ago

How can i use the same bean class for different APIs to create documentation in Swagger

Is there a way i can use the same bean class for different APIs in Swagger documentation. For e.g. If i have a bean class like below and i want to use image for one of my apis and ignore for another api . Can we do it ? If yes how can we achieve this in case of multiple endpoints and one Bean class .
private UserRole primaryRole
private String enterpriseEmplId;
private ComponentState state; 
@JsonIgnore
private CommonsMultipartFile image;
private String mobileNumber;
@Min(value = 1, message = "Country Id should be greater than 0")
private int countryId;

Thanks in Advance.

No RepliesBe the first to reply