Closed gr00vaLisTic closed 1 week ago
@gr00vaLisTic Thank you for reaching out! Currently, the capability to use the $()
interpolation is only available to [read|update|delete]_path
.
Thanks @magodo for your quick response. Is there any workaround to achieve something like this right now or any plans to add the $()
interpolation to locators?
One more addition: I think the same issue is there when it comes to using [read|create]_path
in conjunction with [read|create]_selector
, which also doesn’t support $()
interpolation. So, in case you are willing to add this in the future, it would be very nice to have it for both.
Yes, I'm looking into a solution.
About:
One more addition: I think the same issue is there when it comes to using
[read|create]_path
in conjunction with[read|create]_selector
, which also doesn’t support$()
interpolation. So, in case you are willing to add this in the future, it would be very nice to have it for both.
Could you elaborate about how do you use the $()
for [read|update|delete]_path
, and how it doesn't work for you?
@gr00vaLisTic As a workaround, if the name
in your case is canonical, then you can use that as a filter.
Yes, I'm looking into a solution.
About:
One more addition: I think the same issue is there when it comes to using
[read|create]_path
in conjunction with[read|create]_selector
, which also doesn’t support$()
interpolation. So, in case you are willing to add this in the future, it would be very nice to have it for both.Could you elaborate about how do you use the
$()
for[read|update|delete]_path
, and how it doesn't work for you?
No, in the path it is working fine. But in cases like the one i mentioned, where the path is not where I can filter the collection result to my specific resource I'm interested in, then i would set e.g. the read_path
to a static resource path like /my/resource
and then would need to filter the result collection by using a selector, which would then again need to filter the entries to the one I need, e.g. by using something like body.items.#(id==\"$(body.id)\")
.
All those cases only apply when you have to deal with a collection result because there is no GET-Endpoint for a specific single resource and you can't use the path to select your needed resource by having an id param or at least some filtering by query params etc.
@gr00vaLisTic As a workaround, if the
name
in your case is canonical, then you can use that as a filter.
unfortunately, the name is not unique in our case. :(
One more occurance of this would be the status_locator
when using the prechecks.api
schema btw.
@gr00vaLisTic Could you try out the main
branch? I'll cut a release if it works for you.
Hi,
I'm currently trying to use the poll_create mechanism of
restful_resource
in order to verify that resource creation was actually finished (body has astate
property which isCREATING
at first, andCREATED
when actually done. Unfortunately, there is no endpoint allowing to get just one resource by id, only a generic "GetAll" endpoint.Example:
POST
/my/resource
returnsGET
/my/resource
then might return something likeAs far as I understood, in this case I would need to setup the poll as follows:
This unfortunately doesn't work and my guess by looking at the code is, that
status_locator
doesn't seem to resolve the$(body.id)
value.Am I using this wrong or is this just not possible at the moment?
Thank you, regards!