Skip to content

Copy Serialization Format for Properties That Are Customized #10125

@jorgerangel-msft

Description

@jorgerangel-msft

Consider a model that has the @encode(ArrayEncoding.commaDelimited) decorator on a property:

model SuggestOptions {
  @query("$orderby")
  @encode(ArrayEncoding.commaDelimited)
  orderBy?: string[];

}

And is then customized:

[CodeGenMember("OrderBy")]
public IList<string> OrderBy { get; internal set; } = new List<string>();

The generated serialization code should still handle the encoding from the original wire info. It seems this is being lost resulting in the property not using the encoding metadata at serialization.

Metadata

Metadata

Labels

emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions