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 }