2

I have a Spring Boot web app that exposes an openApi interface using swagger UI. Currently when I'm looking at responses schemas in the generated api docs json I see that fields that are not nullable are not marked as "required" by the framework. I'm looking for a way to globally set at least all primitive values as required, if possible also other types (like UUID for example). I'm trying to avoid the need for annotating each individual property as @NotNull or something of this sort since there are too many classes and properties and its just not going to happen.

Thanks.

4

0 回答 0