swagger-api / swagger-codegen-generators

Apache License 2.0
284 stars 421 forks source link

[JavaSpring] Missing @Valid annotation for multipard/form-data content type if part is object #1281

Open Demonian opened 4 months ago

Demonian commented 4 months ago

THe problem is located in mustache file FormData and it seems that @Valid annotation will only be added to file multipart file part but not to other parts which could be objects with their own required fields

Expected Result:

@Valid annotation is added during generation

Actual Result: @Valid annotation is missing thus required fields inside model are not validated