Skip to content

Commit 6ab9509

Browse files
committed
feat: adding schema and correct payload to rest control respond
1 parent 4cef255 commit 6ab9509

2 files changed

Lines changed: 44 additions & 6 deletions

File tree

definitions/draco_rest/functions/rest_control_respond.proto.json

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@
3636
],
3737
"documentation": []
3838
},
39+
{
40+
"runtimeName": "http_schema",
41+
"defaultValue": null,
42+
"name": [
43+
{
44+
"code": "en-US",
45+
"content": "Content Type"
46+
}
47+
],
48+
"description": [
49+
{
50+
"code": "en-US",
51+
"content": "Specifies the MIME type of the response payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
52+
}
53+
],
54+
"documentation": []
55+
},
3956
{
4057
"runtimeName": "payload",
4158
"defaultValue": null,
@@ -48,7 +65,7 @@
4865
"description": [
4966
{
5067
"code": "en-US",
51-
"content": "Contains the response payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
68+
"content": "Contains the response payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."
5269
}
5370
],
5471
"documentation": []
@@ -82,9 +99,11 @@
8299
}
83100
],
84101
"displayIcon": "tabler:cube-send",
85-
"signature": "<T>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, payload: T): void",
102+
"signature": "<S extends HTTP_SCHEMA>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, http_schema: S, payload: HTTP_PAYLOAD<S>): void",
86103
"linkedDataTypeIdentifiers": [
87104
"HTTP_STATUS_CODE",
88-
"OBJECT"
105+
"OBJECT",
106+
"HTTP_SCHEMA",
107+
"HTTP_PAYLOAD"
89108
]
90109
}

definitions/draco_rest/runtime_functions/rest_control_respond.proto.json

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@
3535
],
3636
"documentation": []
3737
},
38+
{
39+
"runtimeName": "http_schema",
40+
"defaultValue": null,
41+
"name": [
42+
{
43+
"code": "en-US",
44+
"content": "Content Type"
45+
}
46+
],
47+
"description": [
48+
{
49+
"code": "en-US",
50+
"content": "Specifies the MIME type of the response payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
51+
}
52+
],
53+
"documentation": []
54+
},
3855
{
3956
"runtimeName": "payload",
4057
"defaultValue": null,
@@ -47,7 +64,7 @@
4764
"description": [
4865
{
4966
"code": "en-US",
50-
"content": "Contains the response payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
67+
"content": "Contains the response payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."
5168
}
5269
],
5370
"documentation": []
@@ -81,9 +98,11 @@
8198
}
8299
],
83100
"displayIcon": "tabler:cube-send",
84-
"signature": "<T>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, payload: T): void",
101+
"signature": "<S extends HTTP_SCHEMA>(http_status_code: HTTP_STATUS_CODE, headers: OBJECT<{}>, http_schema: S, payload: HTTP_PAYLOAD<S>): void",
85102
"linkedDataTypeIdentifiers": [
86103
"HTTP_STATUS_CODE",
87-
"OBJECT"
104+
"OBJECT",
105+
"HTTP_SCHEMA",
106+
"HTTP_PAYLOAD"
88107
]
89108
}

0 commit comments

Comments
 (0)