Skip to content
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

DecoratorSet throws error if namespace contains scalars. #697

Closed
clrkzha opened this issue Aug 29, 2023 · 0 comments · Fixed by #700
Closed

DecoratorSet throws error if namespace contains scalars. #697

clrkzha opened this issue Aug 29, 2023 · 0 comments · Fixed by #700

Comments

@clrkzha
Copy link

clrkzha commented Aug 29, 2023

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')

image

Context (Environment)

Desktop

  • OS: macOS
  • Browser: Chrome
  • Version: [e.g. 0.22.15]

Detailed Description

Possible Implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants