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
Describe the bug
Whenever using a type that extends Map or Collection but doesn't pass through the generic type parameters as a response we get an error from the arguments.first() call because the arguments are empty.
The easiest examples of this are JsonObject and JsonArray from Kotlinx Serialization. Even though the object is fully serializable, Kompendium doesn't seem to use that data.
To Reproduce
Use JsonObject as a response parameter or create an example class Foo : List<Bar> and use it as the response.
Expected behavior
The definition of the response object should be generated based off the serialization data or search the hierarchy for the types if that's not possible.
Screenshots
The text was updated successfully, but these errors were encountered:
yea this makes sense... should be a pretty easy fix, just need to modify the type detection to check if a type extends collection or map and then treat it accordingly.
Would appreciate a pr for this if you have time :)
But, just so you're aware, somehow the sonatype integration is broken (see #568) and I'm not clear on when I'm going to have time to figure out whatever the heck is wrong with maven central this time... so publishing of kompendium versions is in a bit of a freeze
Describe the bug
Whenever using a type that extends Map or Collection but doesn't pass through the generic type parameters as a response we get an error from the
arguments.first()
call because thearguments
are empty.The easiest examples of this are
JsonObject
andJsonArray
from Kotlinx Serialization. Even though the object is fully serializable, Kompendium doesn't seem to use that data.To Reproduce
Use
JsonObject
as a response parameter or create an example classFoo : List<Bar>
and use it as the response.Expected behavior
The definition of the response object should be generated based off the serialization data or search the hierarchy for the types if that's not possible.
Screenshots
![image](https://private-user-images.githubusercontent.com/117409705/301364833-303ecb2c-4a2e-4398-8505-99172b61874a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjQwNjYsIm5iZiI6MTczOTE2Mzc2NiwicGF0aCI6Ii8xMTc0MDk3MDUvMzAxMzY0ODMzLTMwM2VjYjJjLTRhMmUtNDM5OC04NTA1LTk5MTcyYjYxODc0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTAyNDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZDczNDJmYmRiNWI0NzQ0YTFiYjM4OWVlOWRlMTE4YjE0MGY1NWUzODI1Yzk3ZDI1YWE5NGM5ZTdiMTAwNTE5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Y7EYZQo48yWkXPIyXN-qeK73OPUBKYBz08OLYQnH6kc)
The text was updated successfully, but these errors were encountered: