Skip to content

feat(concerto): add size validator serialization and runtime tests - #1299

Merged
jamieshorten merged 6 commits into
accordproject:mainfrom
muhabdulkadir:moh/serialiser
Aug 26, 2026
Merged

jamieshorten merged 6 commits into
accordproject:mainfrom
muhabdulkadir:moh/serialiser

Conversation

@muhabdulkadir

@muhabdulkadir muhabdulkadir commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1292

Add concertino and concerto serialization support, runtime validation enforcement, and JSON schema updates for the size=[min,max] collection size validator.

Changes

concertino

  • Serialize sizeValidator to/from compact size: [min, max] tuple format
  • Import ICollectionSizeValidator from @accordproject/concerto-metamodel
  • Add size field to ConcertinoProperty in concertino.cto
  • Add size to concertino JSON schema (Property definition)
  • Fix @CodeGen_TypeScript_Override to respect field optionality
  • Add collectionsize.cto fixture for automatic roundtrip coverage
  • Add explicit roundtrip test for sizeValidator on array properties
  • Regenerate TypeScript types from CTO source

concerto-core

  • Add runtime size enforcement in resourcevalidator.ts for primitive/object arrays (checkArray) collection types and both min/max violation 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

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten
jamieshorten merged commit 30a4b7b into accordproject:main Aug 26, 2026
12 checks passed
@muhabdulkadir
muhabdulkadir deleted the moh/serialiser branch August 26, 2026 12:16
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