Closed burnash closed 1 month ago
This pull request adds ability to use JSONPath in path parameter resolve configuration:
Example:
Suppose you have parent resource data item like:
{ "number": 42, "nested_data": { "some_nested_identifier": 24, ... } }
Before this PR you could only refer the number field, like so:
number
{ "resources": [ ... { "name": "issue_comments", "endpoint": { "path": "issues/{issue_number}/comments", "params": { "issue_number": { "type": "resolve", "resource": "issues", "field": "number", } }, }, }, ], }
With this PR you can also refer nested_data.some_nested_identifier field by using JSONPath:
nested_data.some_nested_identifier
{ "resources": [ ... { "name": "issue_comments", "endpoint": { "path": "issues/{issue_number}/comments", "params": { "issue_number": { "type": "resolve", "resource": "issues", "field": "nested_data.some_nested_identifier", } }, }, }, ], }
Thanks @rudolfix, I think passing compiled jsonpath should be covered already per se, it's just the typing needs to be updated, isn't it?
This pull request adds ability to use JSONPath in path parameter resolve configuration:
Example:
Suppose you have parent resource data item like:
Before this PR you could only refer the
number
field, like so:With this PR you can also refer
nested_data.some_nested_identifier
field by using JSONPath: