Skip to content

feat(csharp): implement visitMapDeclaration and fix optional map fields#229

Merged
jamieshorten merged 1 commit into
accordproject:mainfrom
muhabdulkadir:csharp-fix-maps
May 22, 2026
Merged

feat(csharp): implement visitMapDeclaration and fix optional map fields#229
jamieshorten merged 1 commit into
accordproject:mainfrom
muhabdulkadir:csharp-fix-maps

Conversation

@muhabdulkadir
Copy link
Copy Markdown
Contributor

@muhabdulkadir muhabdulkadir commented May 22, 2026

Closes #

CSharp Visitor — Map Declaration Support visitMapDeclaration was silently skipped. The visit() dispatch returned early for map declarations with no output. Map types produced nothing in the generated C# file.

Each Concerto map declaration now emits a named class extending Dictionary<K,V>:

public class NextOfKin : Dictionary<string, string> {}
public class EmployeeDirectory : Dictionary<string, Employee> {}
public class EmployeeTShirtSizes : Dictionary<string, TShirtSizeType> {}

Optional map fields never emitted ?
writeField's map path had no isOptional() check. A field declared optional like o CompanyProperties companyProperties optional always emitted a non-nullable type. Fixed to emit Dictionary<K,V>? when optional.

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

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten jamieshorten merged commit 97fc8e1 into accordproject:main May 22, 2026
16 of 18 checks passed
@muhabdulkadir muhabdulkadir deleted the csharp-fix-maps branch May 22, 2026 10:11
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