|
if (arraySchema.schema().required()) { |
|
return arraySchema.schema().required(); |
|
} |
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.
Hence the code should be changed to use:
if (arraySchema.arraySchema().required()) {
return arraySchema.arraySchema().required();
}
swagger-core/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/SwaggerAnnotationIntrospector.java
Lines 63 to 65 in 6f6e420
According to the comments of
ArraySchemaannotation,ArraySchema.schemadefines the model of the items within the array, whileArraySchema.arraySchemadefines the model for the model of the array itself.Hence the code should be changed to use: