conductor/examples/project-definitions/valid-response-mapping-basic.json
2026-07-18 10:23:13 -04:00

106 lines
3.2 KiB
JSON

{
"$schema": "../../shared/schemas/conductor-project.schema.json",
"schemaVersion": "0.1.0",
"project": {
"id": "proj_response_mapping_basic",
"name": "Response Mapping Basic Demo",
"description": "Step 17.0 example: demonstrates the canonical project.bindings response-mapping model. One Button triggers a GET action. An onSuccess binding routes the full response body to a JsonViewer. A second onSuccess binding routes a specific field (origin) to a Label. Neither binding executes yet — runtime support is added in Step 17.1.",
"pages": [
{
"id": "page_main",
"name": "Main Page",
"order": 0,
"components": [
{
"id": "btn_fetch",
"type": "Button",
"name": "fetchButton",
"position": { "x": 40, "y": 40 },
"size": { "width": 160, "height": 40 },
"properties": {
"label": "Fetch Data",
"visible": true,
"disabled": false
},
"events": [
{
"event": "onClick",
"actionId": "action_httpbin"
}
],
"bindings": []
},
{
"id": "lbl_origin",
"type": "Label",
"name": "originLabel",
"position": { "x": 40, "y": 100 },
"size": { "width": 320, "height": 32 },
"properties": {
"label": "Origin: (click Fetch Data to populate)",
"visible": true,
"disabled": false
},
"events": [],
"bindings": []
},
{
"id": "viewer_result",
"type": "JsonViewer",
"name": "resultsViewer",
"position": { "x": 40, "y": 152 },
"size": { "width": 560, "height": 320 },
"properties": {
"label": "Response Body",
"visible": true,
"disabled": false
},
"events": [],
"bindings": []
}
],
"events": []
}
],
"actions": [
{
"id": "action_httpbin",
"name": "Httpbin GET",
"description": "Anonymous GET to httpbin.org/get. Returns a stable JSON object whose fields (origin, url, args, headers) are used by the Step 17.1 runtime binding test.",
"method": "GET",
"url": "https://httpbin.org/get",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"source": "conductor-step-17"
},
"pathParameters": {},
"bodyTemplate": "",
"authenticationType": "anonymous",
"responseMapping": []
}
],
"bindings": [
{
"id": "bind_body_to_viewer",
"source": "actions.action_httpbin.response.body",
"target": "components.resultsViewer.value",
"trigger": "onSuccess"
},
{
"id": "bind_origin_to_label",
"source": "actions.action_httpbin.response.body.origin",
"target": "components.originLabel.value",
"trigger": "onSuccess"
}
],
"variables": {},
"settings": {}
}
}