Skip to content

Commit b9ca72d

Browse files
committed
feat: enhance http_request_send and rest_control_respond proto files for improved parameter clarity and naming consistency
1 parent 09d0cc7 commit b9ca72d

4 files changed

Lines changed: 105 additions & 212 deletions

File tree

definitions/draco_rest/runtime_functions/rest_control_respond.proto.json

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,59 @@
22
"runtimeName": "rest::control::respond",
33
"runtimeParameterDefinitions": [
44
{
5-
"runtimeName": "http_response",
5+
"runtimeName": "http_status_code",
6+
"defaultValue": null,
67
"name": [
78
{
89
"code": "en-US",
9-
"content": "Http Response"
10+
"content": "HTTP Status Code"
1011
}
1112
],
1213
"description": [
1314
{
1415
"code": "en-US",
15-
"content": "Takes an HTTP response object and transmits it to the requesting client. This parameter represents the final output of the server, including headers, status code, and body content."
16+
"content": "An HTTP status code is a three-digit number (100–599) indicating the result of a request (e.g., 200, 404, 500)."
17+
}
18+
],
19+
"documentation": []
20+
},
21+
{
22+
"runtimeName": "headers",
23+
"defaultValue": null,
24+
"name": [
25+
{
26+
"code": "en-US",
27+
"content": "HTTP response headers"
28+
}
29+
],
30+
"description": [
31+
{
32+
"code": "en-US",
33+
"content": "A collection of key-value pairs containing additional response metadata."
34+
}
35+
],
36+
"documentation": []
37+
},
38+
{
39+
"runtimeName": "payload",
40+
"defaultValue": null,
41+
"name": [
42+
{
43+
"code": "en-US",
44+
"content": "Response Payload"
45+
}
46+
],
47+
"description": [
48+
{
49+
"code": "en-US",
50+
"content": "Contains the response payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
1651
}
1752
],
1853
"documentation": []
1954
}
2055
],
2156
"deprecationMessage": [],
57+
"throwsError": false,
2258
"name": [
2359
{
2460
"code": "en-US",
@@ -41,11 +77,13 @@
4177
"displayMessage": [
4278
{
4379
"code": "en-US",
44-
"content": "Sends ${http_response} as a Response"
80+
"content": "Sends response with status ${http_status_code} and payload ${payload}"
4581
}
4682
],
47-
"throwsError": false,
4883
"displayIcon": "tabler:cube-sent",
49-
"linkedDataTypeIdentifiers": ["HTTP_RESPONSE"],
50-
"signature": "<T>(http_response: HTTP_RESPONSE<T>): void"
84+
"signature": "<T>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, payload: T): void",
85+
"linkedDataTypeIdentifiers": [
86+
"HTTP_STATUS_CODE",
87+
"OBJECT"
88+
]
5189
}

definitions/taurus/http/runtime_functions/http_request_create.proto.json

Lines changed: 0 additions & 108 deletions
This file was deleted.

definitions/taurus/http/runtime_functions/http_request_send.proto.json

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,69 @@
22
"runtimeName": "http::request::send",
33
"runtimeParameterDefinitions": [
44
{
5-
"runtimeName": "http_request",
5+
"runtimeName": "http_method",
66
"defaultValue": null,
77
"name": [
88
{
99
"code": "en-US",
10-
"content": "HTTP request object"
10+
"content": "HTTP Method"
1111
}
1212
],
1313
"description": [
1414
{
1515
"code": "en-US",
16-
"content": "Takes an HTTP request object, which includes the HTTP method, url, headers, and payload, and sends it to the specified endpoint."
16+
"content": "Defines the HTTP method to be used, such as GET, POST, PUT, or DELETE."
17+
}
18+
],
19+
"documentation": []
20+
},
21+
{
22+
"runtimeName": "headers",
23+
"defaultValue": null,
24+
"name": [
25+
{
26+
"code": "en-US",
27+
"content": "HTTP Headers"
28+
}
29+
],
30+
"description": [
31+
{
32+
"code": "en-US",
33+
"content": "A collection of key-value pairs containing additional request metadata."
34+
}
35+
],
36+
"documentation": []
37+
},
38+
{
39+
"runtimeName": "url",
40+
"defaultValue": null,
41+
"name": [
42+
{
43+
"code": "en-US",
44+
"content": "Request URL"
45+
}
46+
],
47+
"description": [
48+
{
49+
"code": "en-US",
50+
"content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."
51+
}
52+
],
53+
"documentation": []
54+
},
55+
{
56+
"runtimeName": "payload",
57+
"defaultValue": null,
58+
"name": [
59+
{
60+
"code": "en-US",
61+
"content": "Request Payload"
62+
}
63+
],
64+
"description": [
65+
{
66+
"code": "en-US",
67+
"content": "Contains the request payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
1768
}
1869
],
1970
"documentation": []
@@ -42,14 +93,16 @@
4293
"displayMessage": [
4394
{
4495
"code": "en-US",
45-
"content": "Send request with ${http_request}"
96+
"content": "Send request to ${url} with ${payload}"
4697
}
4798
],
4899
"deprecationMessage": [],
49100
"displayIcon": "tabler:world-www",
50-
"signature": "<T>(http_request: HTTP_REQUEST<T>): HTTP_RESPONSE<any>",
101+
"signature": "<T>(http_method: HTTP_METHOD, headers: OBJECT<{}>, url: HTTP_URL, payload: T): HTTP_RESPONSE<any>",
51102
"linkedDataTypeIdentifiers": [
52-
"HTTP_RESPONSE",
53-
"HTTP_REQUEST"
103+
"HTTP_METHOD",
104+
"OBJECT",
105+
"HTTP_URL",
106+
"HTTP_RESPONSE"
54107
]
55108
}

definitions/taurus/http/runtime_functions/http_response_create.proto.json

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)