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
My Quarkus app has a wrapper for an API response with a generic field.
I noticed that if my endpoint returns something like Response<List<Cat>>, my openapi model will look like this:
Could you please confirm that this is actually a bug?
P.S.
Also, I noticed that while processing a field of type List<String> in SchemaRegistry#checkRegistration it has type array, whereas when processing a generic field parametrized by List (type.toString() -> "T") it has type object.
The text was updated successfully, but these errors were encountered:
When we resolve the type of a parameterized field, we must check whether it is a collection or not, and change the type to an array, if necessary
egorklimov
changed the title
Error on generic model parametrized by a collection
Wrong generation on generic model parametrized by a collection
Jul 9, 2020
Hi!
My Quarkus app has a wrapper for an API response with a generic field.
I noticed that if my endpoint returns something like
Response<List<Cat>>
, my openapi model will look like this:Expected result:
After some reverse engineering, I added this test case (as an example) to 'GenericModelTypesResourceTest': egorklimov@8c329f4
Test result is the same:
Could you please confirm that this is actually a bug?
P.S.
Also, I noticed that while processing a field of type
List<String>
inSchemaRegistry#checkRegistration
it has typearray
, whereas when processing a generic field parametrized by List (type.toString()
->"T"
) it has typeobject
.The text was updated successfully, but these errors were encountered: