Make all fields required by default, in springDoc-generated openapi specification

Viewed 12

It seems like the spring-doc generator sets all fields as optional, by default, and makes them required - when you explicitly annotate them with @NotNull

This is the opposite of how I work - my fields are all required until annotated with @Nullable.

Is is possible to fix this behaviour for my code?

0 Answers
Related