Skip to content

Incorrect codegen for polymorphic DU "base" type #852

@jhendrixMSFT

Description

@jhendrixMSFT

For polymorphic DU base types, we emit an inline struct definition for the serializer impl. This happens here.

It works for simple model field types. However, if a field requires custom serialization (e.g. base64 encoded bytes, OffsetDateTime), then the codegen is incorrect as the serialization helpers will be absent.

What we need to do is leverage the model field builder code here to emit this type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CodeGenIssues that relate to code generation

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions