autorest.typescript icon indicating copy to clipboard operation
autorest.typescript copied to clipboard

support serialize and deserialize for additional properties in compatible mode

Open qiaozha opened this issue 9 months ago • 1 comments

Currently, we won't be able to do any serialize and deserialize for additional properties, what pr https://github.com/Azure/autorest.typescript/pull/2469 supports is there's no any serialization work between modular and rlc,

but typespec as the below

model Foo {
  ...Record<utcDateTime>
  prop: utcDateTIme;
}

In RLC layer, we will generate

interface Foo extends Record<string, string>{
  prop: string;
}

but in Modular, we will get

interface Foo extends Record<string, Date>{
  prop: Date;
}

serialization and deserialization will be required in this case, regardless if it's compatible mode or not.

qiaozha avatar May 08 '24 10:05 qiaozha