You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we will generate the ser/deserializer for a type if it's model, dict, array, or union, but we could have further check on the elmentType or union variant type or the properties of the model to see if it really needs ser/deser logic for it. Like if the properties between the rest layer and modular layer are inconsistent for the following reasons.
if the name is inconsistent.
if the type is inconsistent.
Here's some considerations of adding this further check.
Pros:
make the generated code size smaller.
performance consideration.
direct assignment is a reference copy, while in the serialization and deserialization, it's normally a deep copy which should probably be less efficient.
Cons:
it will increase the codegen's implementation complexity and runtime complexity.
it will probably be buggy if we miss consideration of a specific case.
previously in hlc, we don't allow extra properties for input, with reference copy, we probably won't be able to do that.
it may be problematic if customer modifies that reference after pass it to our code but before we send out the request.
Currently, we will generate the ser/deserializer for a type if it's model, dict, array, or union, but we could have further check on the elmentType or union variant type or the properties of the model to see if it really needs ser/deser logic for it. Like if the properties between the rest layer and modular layer are inconsistent for the following reasons.
Here's some considerations of adding this further check.
Pros:
direct assignment is a reference copy, while in the serialization and deserialization, it's normally a deep copy which should probably be less efficient.
Cons:
See comment in #2759 (comment)
The text was updated successfully, but these errors were encountered: