Skip to content

Generate discriminator/const fields as defaulted raw values with dual accessors #65

Open

Description

@OmarAlJarrah

Problem

Discriminator/const fields and the typed+raw dual-accessor pattern fall out of the field model and need a codegen template.

Proposed change

Generate const/discriminator fields as defaulted raw values, with a typed accessor and a raw accessor per field. (Two getters + two setters per field reinforces the separate binary-compat baseline for generated code.)

Acceptance

  • Const/discriminator template
  • Dual accessors generated

Depends on the four-state field model.

Dependencies


Priority: medium · Effort: small

Activity

  1. added
    enhancement
    codegen
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegenenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions