You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After replaced the option required at @Schema annotation by requiredMode on #4286, it seems the issue #3438 is shown again.
According to the comments of ArraySchema annotation, ArraySchema.schema defines the model of the items within the array, while ArraySchema.arraySchema defines the model for the model of the array itself.
Example
In this example, I provide an almost same example at the #3438.
It seems this issue is still present (swagger-annotations v2.2.15).
Another possible workaround is to use the @Schema annotation instead of @ArraySchema.
I did not try it but I think it is possible to combine both of them :
publicclassPerson {
@Schema(requiredMode = RequiredMode.REQUIRED) // works@ArraySchema(arraySchema = @Schema(description = "The person"))
// combination of @Schema and @ArraySchema not triedprivateList<String> addresses;
}
After replaced the option
required
at@Schema
annotation byrequiredMode
on #4286, it seems the issue #3438 is shown again.Example
In this example, I provide an almost same example at the #3438.
For the below DTO class:
I expect the generated special to have (but it's not):
And I need to work around this by:
The text was updated successfully, but these errors were encountered: