Skip to content

fix(csharp): harden decorator namespace mapping and required/scalar codegen semantics#234

Merged
jamieshorten merged 1 commit into
accordproject:mainfrom
muhabdulkadir:moh/chsarp-resolve
May 26, 2026
Merged

fix(csharp): harden decorator namespace mapping and required/scalar codegen semantics#234
jamieshorten merged 1 commit into
accordproject:mainfrom
muhabdulkadir:moh/chsarp-resolve

Conversation

@muhabdulkadir
Copy link
Copy Markdown
Contributor

@muhabdulkadir muhabdulkadir commented May 26, 2026

Closes #

This PR improves C# generation reliability by fixing decorator namespace resolution, centralizing required-property emission logic, and preventing scalar naming collisions in generated structs/converters.

Changes

  • Ensures concerto.decorator references are mapped to the runtime metamodel namespace in generated C#.
  • Adds centralized required-property decision logic for fields and relationships.
  • Supports emitting required for non-optional reference properties when enabled.
  • Keeps required opt-in via useRequiredForNonOptionalReferenceTypes.
  • Extends map field generation to respect required emission when the flag is enabled.
  • Adds reference-type detection helper used by required logic.
  • Fixes CS0542 name collision when a scalar is named Value by generating RawValue member access in record structs and converter paths.

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

…odegen semantics

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten jamieshorten merged commit fa35672 into accordproject:main May 26, 2026
15 of 19 checks passed
@muhabdulkadir muhabdulkadir deleted the moh/chsarp-resolve branch May 26, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants