-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(*): Support string length validation #647
Conversation
Looks great so far @ragi-dayananda! Once the introspection class is in place for validation etc. it would be great to update the JSON Schema code generator to use this as an example / test of it being applied. https://json-schema.org/understanding-json-schema/reference/string.html#length |
Docs page to be updated is here: https://concerto.accordproject.org/docs/design/specification/model-properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress, Ragi. I've added some minor comments in-line.
Can you update the issue to track the remaining work, please?
For example:
- validate validate JSON against model files
- compile generate code for a target platform
- TypeScript
- JSON Schema
- etc...
- parse parse a cto string to a JSON syntax tree
- print print a JSON syntax tree to a cto string
- compare compare two Concerto model files
- infer generate a concerto model from a source schema
- generate generate a sample JSON object for a concept
We don't necessarily need complete coverage before we release this work, however, we do need to make sure that we fail gracefully / warn, or hide this work behind an environment variable until it's ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work.
@ragi-dayananda There are a few edge cases missing from your tests. Can you bump the coverage, please? |
Updated the tests cases for mentioned scenarios |
* feat(*): add grammar rules for MapDeclaration Signed-off-by: jonathan.casey <[email protected]> * feat(*): add MapDeclaration case to Printer Signed-off-by: jonathan.casey <[email protected]> * feat(*): add cto & ast test data, for Parse & Print tests Signed-off-by: jonathan.casey <[email protected]> * feat(*): type definitions updated Signed-off-by: jonathan.casey <[email protected]> * chore(*): package-lock update Signed-off-by: jonathan.casey <[email protected]> * feat(*): fix JSDoc Signed-off-by: jonathan.casey <[email protected]> * feat(*): remove MapPropertyKeyDeclaration & MapPropertValueDeclaration as top level declaration Signed-off-by: jonathan.casey <[email protected]> * test(*): decorators on map top level and props Signed-off-by: jonathan.casey <[email protected]> * test(*): negative case for map type - too many properties Signed-off-by: jonathan.casey <[email protected]> * feat(*): add MapRelationshipPropertyValue Signed-off-by: jonathan.casey <[email protected]> * test(*): add more test cov Signed-off-by: jonathan.casey <[email protected]> * feat(*): parser.js update Signed-off-by: jonathan.casey <[email protected]> * feat(*): AST rename Signed-off-by: jonathan.casey <[email protected]> * feat(*): printer evaluates AggregateRelationshipValueType Signed-off-by: jonathan.casey <[email protected]> * feat(*): update test data Signed-off-by: jonathan.casey <[email protected]> * feat(*): cleanup * feat(*): cleanup * feat(*): update parser.js --------- Signed-off-by: jonathan.casey <[email protected]> Signed-off-by: [email protected] <[email protected]>
…cabulary (accordproject#640) chore(deps): bump yaml in /packages/concerto-vocabulary Bumps [yaml](https://github.com/eemeli/yaml) from 2.0.0-9 to 2.2.2. - [Release notes](https://github.com/eemeli/yaml/releases) - [Commits](eemeli/yaml@v2.0.0-9...v2.2.2) --- updated-dependencies: - dependency-name: yaml dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: [email protected] <[email protected]>
enhance edge cases for string validator Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Closes #643
Changes
Flags
Screenshots or Video
Related Issues
Author Checklist
--signoff
option of git commit.main
fromfork:branchname