Working list selection filter
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
def buildPath(path, outputs):
|
||||
if isinstance(path, str):
|
||||
return path
|
||||
|
||||
result = ""
|
||||
|
||||
for part in path:
|
||||
if isinstance(part, dict):
|
||||
value = outputs[part["output"]]
|
||||
|
||||
for key in part.get("keys", []):
|
||||
value = value[key]
|
||||
|
||||
result += str(value)
|
||||
else:
|
||||
result += part
|
||||
|
||||
return result
|
||||
@@ -1,9 +1,12 @@
|
||||
from .object import buildObject
|
||||
from .path import buildPath
|
||||
|
||||
def buildRequest(definition, outputs):
|
||||
path = buildPath(definition.path, outputs)
|
||||
|
||||
request = {
|
||||
"method": definition.method,
|
||||
"path": definition.path,
|
||||
"path": path,
|
||||
}
|
||||
|
||||
if hasattr(definition, "keys"):
|
||||
@@ -25,4 +28,6 @@ def buildRequest(definition, outputs):
|
||||
|
||||
request["headers"] = headers
|
||||
|
||||
print(path)
|
||||
|
||||
return request, outputs
|
||||
|
||||
Reference in New Issue
Block a user