-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Support complex objects as decorator argument values #984
base: main
Are you sure you want to change the base?
Conversation
a9d8a75
to
aacef51
Compare
Hi @DianaLease , I have successfully signed off my commits with DCO and updated the PR description to reference the issue. Will you please Let me know if any further changes are needed. |
@Mamatha1718 I think you are building on top your older branch you were using for the analysis PR. I can see the concerto analysis changes here as well. Can you please fix the DCO signoff as well. Please follow the steps in Contributors guidelines. |
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.
Can you please separate the decorator related changes from the analysis related changes?
@@ -159,6 +159,25 @@ class Decorator { | |||
this.handleError(validationOptions.invalidDecorator, err); | |||
} | |||
break; | |||
case 'DecoratorJSON': { |
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.
Can you please add happy and sad path test cases covering the new code and functionality you've added.
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.
Hi @sanketshevkar , I have added test cases to validate the new functionality:
=> Happy Path: valid JSON decorator argument.
=> Sad Path:
JSON key is not a string
JSON value is unsupported
Argument is not an object
I also updated the beforeEach
setup to properly stub getModelManager( )
. I am currently facing a small issue:
"TypeError: Cannot read properties of undefined (reading "returns" )".
It seems related to sinon.stubInstance(AssetDeclaration)
Any suggestions on handling this stub properly ?
Will you please let me know if further changes need.
Thank You.
@@ -917,12 +917,29 @@ DecoratorIdentifier = | |||
...buildRange(location()) | |||
} | |||
} | |||
|
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.
You'll have to run the codegen command to generate the parser expressions for this new grammar.
9bdae69
to
74f0bec
Compare
Hi @sanketshevkar ,Sorry for the inconvenience. I have created a new PR from a clean branch and successfully signed off the DCO. Let me know if any further changes are needed. Thanks! |
Hi @sanketshevkar , I separate the decorator and analysis related changes. analysis related changes move into new branch. |
Signed-off-by: Matt Roberts <[email protected]> Signed-off-by: Mamatha Bandi <[email protected]>
* chore(actions): publish v3.20.1 to npm Signed-off-by: GitHub <[email protected]> * fix(utils): fix browser build for concerto-util Signed-off-by: sanketshevkar <[email protected]> * fix(utils): fix browser build for concerto-util Signed-off-by: sanketshevkar <[email protected]> * fix(utils): fix browser build for concerto-util Signed-off-by: sanketshevkar <[email protected]> --------- Signed-off-by: GitHub <[email protected]> Signed-off-by: sanketshevkar <[email protected]> Co-authored-by: mttrbrts <[email protected]> Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
wq Signed-off-by: Mamatha Bandi <[email protected]> Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]> Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
Signed-off-by: Mamatha Bandi <[email protected]>
ec617a7
to
f9aa4a2
Compare
Add support for JSON objects in decorator argument
Changes
=> Added
DecoratorJSON
type to support key-value pairs in decorator arguments.= >Updated
parser.pegjs
to parse JSON objects within decorators.=> Enhanced
validate()
function to check JSON structure, ensuring keys are stringsand values are valid types (string, number and boolean).
=> Improves readability and flexibility for complex decorator arguments.
Closes
Closes #918