Repository: bkbnio/kompendium (kotlin)

Issue:
Unable to use sealed typed collections
Kompendium fails when dealing with sealed typed (polymorphic) collection in response or request.
Error:
```
Exception in thread "main" java.lang.IllegalStateException: Unable to parse field type from val io.bkbn.kompendium.playground.FieldValue.name: kotlin.String
	at io.bkbn.kompendium.core.handler.ObjectHandler.handleDefault(ObjectHandler.kt:88)
	at io.bkbn.kompendium.core.handler.ObjectHandler.generateFieldMap(ObjectHandler.kt:70)
	at io.bkbn.kompendium.core.handler.ObjectHandler.handle(ObjectHandler.kt:50)
	at io.bkbn.kompendium.core.Kontent$generateKTypeKontent$2.invoke(Kontent.kt:94)
	at io.bkbn.kompendium.core.util.Helpers.logged(Helpers.kt:26)
	at io.bkbn.kompendium.core.Kontent.generateKTypeKontent(Kontent.kt:76)
	at io.bkbn.kompendium.core.handler.CollectionHandler.handle(CollectionHandler.kt:30)
...
```


```kotlin
@Serializable
data class Response(
  val values: List<FieldValue>
)

@Serializable
@JsonClassDiscriminator("type")
sealed class FieldValue {
  abstract val name: String
  abstract val value: String

  @Serializable
  @SerialName("text")
  data class Text(override val name: String, override val value: String) : FieldValue()

  @Serializable
  @SerialName("signature")
  data class Signature(override val name: String, override val value: String, val signed: Boolean) : FieldValue()
}
```

The crash happens here when trying to get field type of a sealed class.
https://github.com/bkbnio/kompendium/blob/c8f64a50b0094957a5fda20dcf2ccd8f3df8d035/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/ObjectHandler.kt#L88

If I remove the following line then everything works perfect (including Swagger):
https://github.com/bkbnio/kompendium/blob/c8f64a50b0094957a5fda20dcf2ccd8f3df8d035/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/CollectionHandler.kt#L30

Pull request description:
Fix for https://github.com/bkbnio/kompendium/issues/199

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd81a25656..9ae2f43f83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
 ### Added
 
 ### Changed
+- Fixed sealed typed collections schema generation
 
 ### Remove
 
diff --git a/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/CollectionHandler.kt b/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/CollectionHandler.kt
index 101b455f99..0903f1cba5 100644
--- a/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/CollectionHandler.kt
+++ b/kompendium-core/src/main/kotlin/io/bkbn/kompendium/core/handler/CollectionHandler.kt
@@ -27,7 +27,6 @@ object CollectionHandler : SchemaHandler {
     val collectionClass = collectionType.classifier as KClass<*>
     logger.debug("Obtained collection class: $collectionClass")
     val referenceName = Helpers.genericNameAdapter(type, clazz)
-    generateKTypeKontent(collectionType, cache)
     val valueReference = when (collectionClass.isSealed) {
       true -> {
         val subTypes = gatherSubTypes(collectionType)
@@ -39,6 +38,7 @@ object CollectionHandler : SchemaHandler {
         })
       }
       false -> {
+        generateKTypeKontent(collectionType, cache)
         val schema = cache[collectionClass.simpleName] ?: error("${collectionClass.simpleName} not found")
         val slug = collectionClass.simpleName!!
         postProcessSchema(schema, slug)


Test patch:
diff --git a/kompendium-core/src/test/resources/polymorphic_list_response.json b/kompendium-core/src/test/resources/polymorphic_list_response.json
index 8dc0f48072..2898dba9cc 100644
--- a/kompendium-core/src/test/resources/polymorphic_list_response.json
+++ b/kompendium-core/src/test/resources/polymorphic_list_response.json
@@ -60,10 +60,6 @@
   },
   "components": {
     "schemas": {
-      "FlibbityGibbit": {
-        "properties": {},
-        "type": "object"
-      },
       "SimpleGibbit": {
         "properties": {
           "a": {