forked from accordproject/concerto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dcs): optimize decorate models (accordproject#857)
* feat(dcs): optimize decorate models Signed-off-by: Sanket Shevkar <[email protected]> * refactor(core): optimized decorateModels added Signed-off-by: sanketshevkar <[email protected]> * chore(core): code refactor and cleanup Signed-off-by: sanketshevkar <[email protected]> * chore(core): code refactor and cleanup Signed-off-by: sanketshevkar <[email protected]> * chore(core): new test added for validation of new and old methods used to decorate models Signed-off-by: sanketshevkar <[email protected]> * chore(core): code refactor Signed-off-by: sanketshevkar <[email protected]> * chore(core): resolve review comments and suggestions Signed-off-by: sanketshevkar <[email protected]> * chore(*): resolve PR suggestions and comments Signed-off-by: sanketshevkar <[email protected]> * chore(*): resolve PR suggestions and comments Signed-off-by: sanketshevkar <[email protected]> --------- Signed-off-by: Sanket Shevkar <[email protected]> Signed-off-by: sanketshevkar <[email protected]>
- Loading branch information
1 parent
c252d82
commit bf3385c
Showing
11 changed files
with
999 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
packages/concerto-core/test/data/decoratorcommands/decoratedTest.cto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
namespace [email protected] | ||
|
||
@Declaration() | ||
@NamespaceDeclaration() | ||
@NamespaceDeprecated() | ||
@Namespace() | ||
scalar SSN extends String | ||
|
||
@Editable | ||
@NamespaceDeprecated() | ||
@Namespace() | ||
concept Person { | ||
@Custom | ||
@Type("Property") | ||
o String firstName | ||
@Type("Property") | ||
o String lastName | ||
@Type("Property") | ||
o String bio | ||
o SSN ssn | ||
@Type("Property") | ||
o String address1 | ||
@Type("Property") | ||
o String address2 | ||
@Type("Property") | ||
o String city | ||
@Property() | ||
@DeclarationProperty() | ||
@NamespaceDeclarationProperty() | ||
@NamespaceProperty() | ||
@NamespaceDeclarationPropertyType() | ||
@NamespacePropertyType() | ||
@DeclarationPropertyType() | ||
@PropertyType() | ||
@Type("Property") | ||
@NamespaceDeclarationTypeProperties() | ||
@Properties() | ||
@DeclarationProperties() | ||
@NamespaceDeclarationProperties() | ||
@NamespaceProperties() | ||
@NamespaceTypeProperties() | ||
o String country | ||
@Properties() | ||
@DeclarationProperties() | ||
@NamespaceDeclarationProperties() | ||
@NamespaceProperties() | ||
@DeclarationTypeProperties() | ||
o Integer zip | ||
o Dictionary dictionary | ||
} | ||
|
||
@NamespaceDeprecated() | ||
@Namespace() | ||
map Dictionary { | ||
@MapElement() | ||
@DeclarationMapElement() | ||
@NamespaceDeclarationMapElement() | ||
@NamespaceMapElement() | ||
o String | ||
@NamespaceDeclarationTypeMapElement() | ||
@MapElement() | ||
@NamespaceTypeMapElement() | ||
@DeclarationTypeMapElement() | ||
@Type("MapValue") | ||
o String | ||
} | ||
|
||
@NamespaceDeprecated() | ||
@Namespace() | ||
map Rolodex { | ||
@MapElement() | ||
@NamespaceMapElement() | ||
o String | ||
@MapElement() | ||
@NamespaceTypeMapElement() | ||
@Type("MapValue") | ||
o String | ||
} | ||
|
||
@NamespaceDeprecated() | ||
@Namespace() | ||
enum Miscellaneous { | ||
@Property() | ||
@NamespaceProperty() | ||
@Properties() | ||
@NamespaceProperties() | ||
@PropertiesType() | ||
o country | ||
o USA | ||
@Properties() | ||
@NamespaceProperties() | ||
@PropertiesType() | ||
o zip | ||
o dictionary | ||
} |
89 changes: 89 additions & 0 deletions
89
packages/concerto-core/test/data/decoratorcommands/normal.cto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
namespace [email protected] | ||
|
||
@Declaration() | ||
@NamespaceDeclaration() | ||
@NamespaceDeprecated() | ||
@MapElement() | ||
@NamespaceMapElement() | ||
@Namespace() | ||
scalar SSN extends String | ||
|
||
@Editable | ||
@NamespaceDeprecated() | ||
@MapElement() | ||
@NamespaceMapElement() | ||
@Namespace() | ||
concept Person { | ||
@Custom | ||
@Type("Property") | ||
o String firstName | ||
@Type("Property") | ||
o String lastName | ||
@Type("Property") | ||
o String bio | ||
o SSN ssn | ||
@Type("Property") | ||
o String address1 | ||
@Type("Property") | ||
@NamespaceDeclarationTypeProperties() | ||
@Properties() | ||
@DeclarationProperties() | ||
@NamespaceDeclarationProperties() | ||
@NamespaceProperties() | ||
@NamespaceTypeProperties() | ||
@DeclarationTypeProperties() | ||
@PropertiesType() | ||
o String address2 | ||
@Type("Property") | ||
o String city | ||
@Property() | ||
@DeclarationProperty() | ||
@NamespaceDeclarationProperty() | ||
@NamespaceProperty() | ||
@NamespaceDeclarationPropertyType() | ||
@NamespacePropertyType() | ||
@DeclarationPropertyType() | ||
@PropertyType() | ||
@Type("Property") | ||
o String country | ||
o Integer zip | ||
o Dictionary dictionary | ||
} | ||
|
||
@NamespaceDeprecated() | ||
@Property() | ||
@NamespaceProperty() | ||
@Properties() | ||
@NamespaceProperties() | ||
@Namespace() | ||
map Dictionary { | ||
@MapElement() | ||
@DeclarationMapElement() | ||
@NamespaceDeclarationMapElement() | ||
@NamespaceMapElement() | ||
o String | ||
@NamespaceDeclarationTypeMapElement() | ||
@MapElement() | ||
@NamespaceTypeMapElement() | ||
@DeclarationTypeMapElement() | ||
@TypeMapElement() | ||
@Type("MapValue") | ||
o String | ||
} | ||
|
||
@NamespaceDeprecated() | ||
@Property() | ||
@NamespaceProperty() | ||
@Properties() | ||
@NamespaceProperties() | ||
@Namespace() | ||
map Rolodex { | ||
@MapElement() | ||
@NamespaceMapElement() | ||
o String | ||
@MapElement() | ||
@NamespaceTypeMapElement() | ||
@TypeMapElement() | ||
@Type("MapValue") | ||
o String | ||
} |
Oops, something went wrong.