Closed bvn13 closed 3 years ago
Looks like I havefound a solution.
@Schema(description = "Money")
@lombok.Data
public class MoneyDto {
@Schema(description = "Amount of money")
@NonNull
BigDecimal amount;
@Schema(description = "Currency of money", type = "string")
@JsonSerialize(using = JsonCurrencySerializer.class)
@NonNull
Currency currency;
}
This issue is solved.
Hi!
Is there any way to make this library to apply a serialization for any field of DTO?
Consider I have a DTO:
How to make this library to serialize currency as String? I can set up an ObjectMapper to do it. But it will not be reflected in generated Swagger Docs.