I'm making a REST API and I would like to add at the class generation the Jackson annotation to ignore null fields, so I would like to add this annotation onfly for certain classes, not for the hole project.
I know that this could be acomplished by adding in application.properties the following line :
spring.jackson.default-property-inclusion=non_null
But this is for entire project.
I see that there are some ".mustache" files
- api.mustache
- apiController.mustache
I supose that I have to add some code in one of this one, or should I insert some code in application.yml ?
I'm also using Spring Boot with Swagger-codgen.
Thank you in advance and have a nice day!