DecoratorSet throws error if namespace contains scalars. #697
Labels
Difficulty: Starter
Good First Issue
Good for newcomers
Type: Bug 🐛
Something isn't working
Type: Need Investigation 🔬
Bug Report 🐛
Applying decoratorSet throws error if the namespace contains scalars.
In all the examples, decoratorSet has two ways to target, I don't see how I target a scalar in a namespace? Could you provide an example of the payload?
Assuming I have
namespace test
scalar PhoneNumber extends String
1:
"target" : {
"$class" : "org.accordproject.decoratorcommands.CommandTarget",
"namespace" : "test",
"declaration" : "PhoneNumber", -------> Is that right?
"property" : "bio" ---------> What should use here?
},
2
"target" : {
"$class" : "org.accordproject.decoratorcommands.CommandTarget",
"type" : "[email protected]" -----------> ?
},
Expected Behavior
No errors when applying decoratorSet
Current Behavior
Here is how to repro:
1 Use the example here https://concerto.accordproject.org/docs/reference/api/api-js-decorator-command-set
2 add a scalar PhoneNumber extends String in the model, then receives the error TypeError: Cannot read properties of undefined (reading 'forEach')
Context (Environment)
Desktop
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: