Skip to content

fix(csharp): emit required for non-optional arrays of scalar and enum types#236

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

fix(csharp): emit required for non-optional arrays of scalar and enum types#236
jamieshorten merged 1 commit into
accordproject:mainfrom
muhabdulkadir:moh/fix-csharp

Conversation

@muhabdulkadir
Copy link
Copy Markdown
Contributor

@muhabdulkadir muhabdulkadir commented May 26, 2026

Closes #

shouldEmitRequired() checked isScalarAlias and isEnum before isArray, causing it to return false for non-optional arrays of scalar types (e.g. UUID[]) and enum types (e.g. Status[]). In C#, arrays are always reference types; even Guid[] or Status[], and should receive the required modifier when useRequiredForNonOptionalReferenceTypes is enabled.

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

… types

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten jamieshorten merged commit 16c3aaf into accordproject:main May 26, 2026
11 checks passed
@muhabdulkadir muhabdulkadir deleted the moh/fix-csharp branch May 26, 2026 14:33
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