From b5ab34c043d7720135c06444de34a9d99cb4a4a3 Mon Sep 17 00:00:00 2001 From: Elijah Mooring Date: Sun, 27 Oct 2024 00:32:44 -0500 Subject: [PATCH] fix: JsonClassDescriminator not being noticed --- app/src/main/java/com/example/objectionapp/Schema.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/objectionapp/Schema.kt b/app/src/main/java/com/example/objectionapp/Schema.kt index 7715c11..a92035f 100644 --- a/app/src/main/java/com/example/objectionapp/Schema.kt +++ b/app/src/main/java/com/example/objectionapp/Schema.kt @@ -110,7 +110,7 @@ private fun getSealedSchema(rootDescriptor: SerialDescriptor): ItemSchema.EnumSc var discriminatorKey: String? = null var contentKey: String? = null - for (annotation in descriptor.annotations) { + for (annotation in rootDescriptor.annotations) { if (annotation is JsonClassDiscriminator) { discriminatorKey = annotation.discriminator }