Skip to content

Commit 976ea28

Browse files
author
Oleksandr Bazarnov
committed
updated examples
1 parent 427875b commit 976ea28

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,24 +2058,29 @@ definitions:
20582058
- stream_partition
20592059
- stream_slice
20602060
examples:
2061-
- type: RequestBodyJson
2061+
- type: RequestBodyJsonObject
20622062
value:
20632063
sort_order: "ASC"
20642064
sort_field: "CREATED_AT"
2065-
- type: RequestBodyJson
2065+
- type: RequestBodyJsonObject
20662066
value:
20672067
key: "{{ config['value'] }}"
2068-
- type: RequestBodyJson
2068+
- type: RequestBodyJsonObject
20692069
value:
20702070
sort:
20712071
field: "updated_at"
20722072
order: "ascending"
2073-
- type: RequestBodyData
2073+
- type: RequestBodyPlainText
20742074
value: "plain_text_body"
2075-
- type: RequestBodyData
2075+
- type: RequestBodyUrlEncodedForm
20762076
value:
20772077
param1: "value1"
20782078
param2: "{{ config['param2_value'] }}"
2079+
- type: RequestBodyGraphQL
2080+
value:
2081+
query:
2082+
param1: "value1"
2083+
param2: "{{ config['param2_value'] }}"
20792084
request_headers:
20802085
title: Request Headers
20812086
description: Return any non-auth headers. Authentication headers will overwrite any overlapping headers returned from this method.

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,19 +2337,31 @@ class HttpRequester(BaseModelWithDeprecations):
23372337
description="Specifies how to populate the body of the request with a payload. Can contain nested objects.",
23382338
examples=[
23392339
{
2340-
"type": "RequestBodyJson",
2340+
"type": "RequestBodyJsonObject",
23412341
"value": {"sort_order": "ASC", "sort_field": "CREATED_AT"},
23422342
},
2343-
{"type": "RequestBodyJson", "value": {"key": "{{ config['value'] }}"}},
23442343
{
2345-
"type": "RequestBodyJson",
2344+
"type": "RequestBodyJsonObject",
2345+
"value": {"key": "{{ config['value'] }}"},
2346+
},
2347+
{
2348+
"type": "RequestBodyJsonObject",
23462349
"value": {"sort": {"field": "updated_at", "order": "ascending"}},
23472350
},
2348-
{"type": "RequestBodyData", "value": "plain_text_body"},
2351+
{"type": "RequestBodyPlainText", "value": "plain_text_body"},
23492352
{
2350-
"type": "RequestBodyData",
2353+
"type": "RequestBodyUrlEncodedForm",
23512354
"value": {"param1": "value1", "param2": "{{ config['param2_value'] }}"},
23522355
},
2356+
{
2357+
"type": "RequestBodyGraphQL",
2358+
"value": {
2359+
"query": {
2360+
"param1": "value1",
2361+
"param2": "{{ config['param2_value'] }}",
2362+
}
2363+
},
2364+
},
23532365
],
23542366
title="Request Body Payload to be send as a part of the API request.",
23552367
)

0 commit comments

Comments
 (0)