Description
date-time schema fields are mapped to kotlin.time.Instant, but no serializer is generated or registered for it. Generated @Serializable data classes with a date-time property fail to compile:
e: .../model/Pet.kt:27:25 Serializer has not been found for type 'Instant?'.
To use context serializer as fallback, explicitly annotate type or property with @Contextual
kotlinx-serialization (1.8.1) has no built-in serializer for the new stdlib kotlin.time.Instant. UUID fields already get a generated UuidSerializer + @UseSerializers; date-time needs equivalent handling.
How to reproduce
Generate a client from a spec with a property { type: string, format: date-time } inside a component schema, then compile the output.
Acceptance criteria
Discovered in
PR #88 (compilation test for #46) — the date-time field was omitted from the test spec to keep that PR focused.
Description
date-timeschema fields are mapped tokotlin.time.Instant, but no serializer is generated or registered for it. Generated@Serializabledata classes with a date-time property fail to compile:kotlinx-serialization(1.8.1) has no built-in serializer for the new stdlibkotlin.time.Instant. UUID fields already get a generatedUuidSerializer+@UseSerializers; date-time needs equivalent handling.How to reproduce
Generate a client from a spec with a property
{ type: string, format: date-time }inside a component schema, then compile the output.Acceptance criteria
@Serializableclasses withdate-timeproperties compilekotlin.time.Instantis generated/registered (mirroring the UUID approach) or another supported mapping is chosendate-timefield to the feature-rich spec inJustworksPluginFunctionalTest)Discovered in
PR #88 (compilation test for #46) — the date-time field was omitted from the test spec to keep that PR focused.