ts-generator icon indicating copy to clipboard operation
ts-generator copied to clipboard

Field ordering

Open kennycason opened this issue 2 years ago • 0 comments

I noticed #13 was closed, but I'm also interested in being able to preserve sort order. I've integrated the library and have really enjoyed it, but being able to preserve field order is important enough that I fear it will ultimately result in us not being able to use the library without this feature as we are currently still manually sorting fields by hand post generation.

I see that the field ordering is based on Kotlin's reflection library, but am curious if you have any ideas on how to implement this feature?

I also noticed the ClassTransfomer.transformPropertyList(properties: List<KProperty<*>>, klass: KClass<*>): List<KProperty<*>> which looked promising but I haven't dug in very deeply.

Thanks!

kennycason avatar Mar 24 '22 03:03 kennycason