Skip to content

feat(concerto-cto): add collection size validator for array and map properties to pegjs - #1296

Merged
jamieshorten merged 2 commits into
accordproject:mainfrom
muhabdulkadir:moh/cto-collection-validator
Aug 25, 2026
Merged

jamieshorten merged 2 commits into
accordproject:mainfrom
muhabdulkadir:moh/cto-collection-validator

Conversation

@muhabdulkadir

@muhabdulkadir muhabdulkadir commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1292

Adds size=[min,max] syntax to constrain element counts on array properties and map-typed properties.

  • Parse and print size=[min,max] on all array-capable field types and relationship declarations
  • Add CTO/JSON fixture tests for round-trip coverage
o String[] tags size=[2,5]
o Integer[] scores size=[1,]
o PhoneBook contacts size=[1,50]
--> Person[] advisors size=[,3] optional

Related Issues

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

…roperties to pegjs

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten

Copy link
Copy Markdown
Collaborator

Are there any tests we can add for the parser here?

@muhabdulkadir

Copy link
Copy Markdown
Contributor Author

parser here

Yeah, that is tested. The CTO gets round-tripped in our current set up. I would add some negative test coverage too.

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@muhabdulkadir
muhabdulkadir force-pushed the moh/cto-collection-validator branch from 4f1e078 to 221b8d3 Compare August 25, 2026 14:23
@jamieshorten
jamieshorten merged commit 282943a into accordproject:main Aug 25, 2026
12 checks passed
@muhabdulkadir
muhabdulkadir deleted the moh/cto-collection-validator branch August 25, 2026 14:29
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