Section https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/formats.md#custom-formats-experimental should also explain how to properly use `SerialDescriptor.getElementDescriptors()` to write a schema generator if you're authoring a serialization format with a schema.