swagger-core
swagger-core copied to clipboard
When class extends ArrayList the generated schema has no "items" property
Hello,
When generating a swagger documentation for a class extending ArrayList, the schema of the class doesn't have the "items" property.
It happens with this particular schema:

Here is a demo project using Java 11, SpringBoot 2.7.2, springdoc-openapi-webmvc-core 1.6.10 based on Swagger-core 2.2.2: https://github.com/didjoman/springdoc-extension-of-arraylist-issue
The issue can be observed when doing this:
ResolvedSchema resolvedSchema = ModelConverters.getInstance()
.resolveAsResolvedSchema(new AnnotatedType(Knowledge.class).resolveAsRef(true));
// Then check resolvedSchema.referencedSchemas.get("Books")
I initially opened this springdoc/springdoc-openapi#1800, and bnasslahsen told me the issue was on Swagger-core.