Yannick Pulver
01/06/2025, 10:29 AMwire
to generate Kotlin classes from proto in our KMP project. We got this construct to pass in Uuid’s:
message UuidValue {
string value = 1;
}
Is there a way to parse this construct to kotlin.uuid.Uuid
(or similar)?. Mainly to prevent saving non-valid uuid’s. I saw the option to pass in a schemaHandlerFactoryClass
, but adapting the default Kotlin Proto Parser might not be straightforward (maybe not recommended?)Benoit Quenaudon
01/06/2025, 11:49 AMBenoit Quenaudon
01/06/2025, 11:57 AMwire {
custom {
// This one would only generate the message for Uuid and claim it so that the other targets don't generate it
}
kotlin {
// Generates the rest. Not sure how it would know to use the right class when a field is of type `UuidValue`
}
}
Yannick Pulver
01/06/2025, 12:13 PMjw
01/06/2025, 12:31 PMjw
01/06/2025, 12:32 PMYannick Pulver
01/06/2025, 12:46 PM