-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow flat interpolation #13601
Allow flat interpolation #13601
Conversation
b3180db
to
ffa5155
Compare
ffa5155
to
1b01270
Compare
1b01270
to
d226d76
Compare
require.NoError(t, err) | ||
assert.Equal(t, "aValue1", responseValue.(string)) | ||
assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) |
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.
I don't get it. Where do we create this nested "response" key in the map? Is it now a requirement for every capability?
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.
I've tagged you where we add the response key.
The only requirement this PR introduces is for capabilities to return a map, not just any value. I think this is preferable because a) all capabilities so far return a map anyway, and b) it's symmetric with the inputs we expect
@@ -409,8 +409,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit | |||
|
|||
value := request.Inputs.Underlying["executeValue1"] | |||
|
|||
response, err := values.NewMap(map[string]any{"response": value}) |
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.
@bolekk This is where we create the response value
f177173
to
31a8e13
Compare
bd617b0
to
1f096fb
Compare
Quality Gate passedIssues Measures |
Ticket
Requires Dependencies
inputs
chainlink-common#540Resolves Dependencies