Skip to content

Commit 14f1ce3

Browse files
committed
revert formatting on generated file
1 parent 5d46da6 commit 14f1ce3

File tree

1 file changed

+49
-71
lines changed

1 file changed

+49
-71
lines changed

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 49 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
2+
13
# generated by datamodel-codegen:
24
# filename: declarative_component_schema.yaml
35

@@ -621,9 +623,7 @@ class OAuthAuthenticator(BaseModel):
621623
scopes: Optional[List[str]] = Field(
622624
None,
623625
description="List of scopes that should be granted to the access token.",
624-
examples=[
625-
["crm.list.read", "crm.objects.contacts.read", "crm.schema.contacts.read"]
626-
],
626+
examples=[["crm.list.read", "crm.objects.contacts.read", "crm.schema.contacts.read"]],
627627
title="Scopes",
628628
)
629629
token_expiry_date: Optional[str] = Field(
@@ -1134,28 +1134,24 @@ class OAuthConfigSpecification(BaseModel):
11341134
class Config:
11351135
extra = Extra.allow
11361136

1137-
oauth_user_input_from_connector_config_specification: Optional[Dict[str, Any]] = (
1138-
Field(
1139-
None,
1140-
description="OAuth specific blob. This is a Json Schema used to validate Json configurations used as input to OAuth.\nMust be a valid non-nested JSON that refers to properties from ConnectorSpecification.connectionSpecification\nusing special annotation 'path_in_connector_config'.\nThese are input values the user is entering through the UI to authenticate to the connector, that might also shared\nas inputs for syncing data via the connector.\nExamples:\nif no connector values is shared during oauth flow, oauth_user_input_from_connector_config_specification=[]\nif connector values such as 'app_id' inside the top level are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['app_id']\n }\n }\nif connector values such as 'info.app_id' nested inside another object are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['info', 'app_id']\n }\n }",
1141-
examples=[
1142-
{"app_id": {"type": "string", "path_in_connector_config": ["app_id"]}},
1143-
{
1144-
"app_id": {
1145-
"type": "string",
1146-
"path_in_connector_config": ["info", "app_id"],
1147-
}
1148-
},
1149-
],
1150-
title="OAuth user input",
1151-
)
1137+
oauth_user_input_from_connector_config_specification: Optional[Dict[str, Any]] = Field(
1138+
None,
1139+
description="OAuth specific blob. This is a Json Schema used to validate Json configurations used as input to OAuth.\nMust be a valid non-nested JSON that refers to properties from ConnectorSpecification.connectionSpecification\nusing special annotation 'path_in_connector_config'.\nThese are input values the user is entering through the UI to authenticate to the connector, that might also shared\nas inputs for syncing data via the connector.\nExamples:\nif no connector values is shared during oauth flow, oauth_user_input_from_connector_config_specification=[]\nif connector values such as 'app_id' inside the top level are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['app_id']\n }\n }\nif connector values such as 'info.app_id' nested inside another object are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['info', 'app_id']\n }\n }",
1140+
examples=[
1141+
{"app_id": {"type": "string", "path_in_connector_config": ["app_id"]}},
1142+
{
1143+
"app_id": {
1144+
"type": "string",
1145+
"path_in_connector_config": ["info", "app_id"],
1146+
}
1147+
},
1148+
],
1149+
title="OAuth user input",
11521150
)
1153-
oauth_connector_input_specification: Optional[OauthConnectorInputSpecification] = (
1154-
Field(
1155-
None,
1156-
description='The DeclarativeOAuth specific blob.\nPertains to the fields defined by the connector relating to the OAuth flow.\n\nInterpolation capabilities:\n- The variables placeholders are declared as `{{my_var}}`.\n- The nested resolution variables like `{{ {{my_nested_var}} }}` is allowed as well.\n\n- The allowed interpolation context is:\n + base64Encoder - encode to `base64`, {{ {{my_var_a}}:{{my_var_b}} | base64Encoder }}\n + base64Decorer - decode from `base64` encoded string, {{ {{my_string_variable_or_string_value}} | base64Decoder }}\n + urlEncoder - encode the input string to URL-like format, {{ https://test.host.com/endpoint | urlEncoder}}\n + urlDecorer - decode the input url-encoded string into text format, {{ urlDecoder:https%3A%2F%2Fairbyte.io | urlDecoder}}\n + codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {{ {{state_value}} | codeChallengeS256 }}\n\nExamples:\n - The TikTok Marketing DeclarativeOAuth spec:\n {\n "oauth_connector_input_specification": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "consent_url": "https://ads.tiktok.com/marketing_api/auth?{{client_id_key}}={{client_id_value}}&{{redirect_uri_key}}={{ {{redirect_uri_value}} | urlEncoder}}&{{state_key}}={{state_value}}",\n "access_token_url": "https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/",\n "access_token_params": {\n "{{ auth_code_key }}": "{{ auth_code_value }}",\n "{{ client_id_key }}": "{{ client_id_value }}",\n "{{ client_secret_key }}": "{{ client_secret_value }}"\n },\n "access_token_headers": {\n "Content-Type": "application/json",\n "Accept": "application/json"\n },\n "extract_output": ["data.access_token"],\n "client_id_key": "app_id",\n "client_secret_key": "secret",\n "auth_code_key": "auth_code"\n }\n }\n }',
1157-
title="DeclarativeOAuth Connector Specification",
1158-
)
1151+
oauth_connector_input_specification: Optional[OauthConnectorInputSpecification] = Field(
1152+
None,
1153+
description='The DeclarativeOAuth specific blob.\nPertains to the fields defined by the connector relating to the OAuth flow.\n\nInterpolation capabilities:\n- The variables placeholders are declared as `{{my_var}}`.\n- The nested resolution variables like `{{ {{my_nested_var}} }}` is allowed as well.\n\n- The allowed interpolation context is:\n + base64Encoder - encode to `base64`, {{ {{my_var_a}}:{{my_var_b}} | base64Encoder }}\n + base64Decorer - decode from `base64` encoded string, {{ {{my_string_variable_or_string_value}} | base64Decoder }}\n + urlEncoder - encode the input string to URL-like format, {{ https://test.host.com/endpoint | urlEncoder}}\n + urlDecorer - decode the input url-encoded string into text format, {{ urlDecoder:https%3A%2F%2Fairbyte.io | urlDecoder}}\n + codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {{ {{state_value}} | codeChallengeS256 }}\n\nExamples:\n - The TikTok Marketing DeclarativeOAuth spec:\n {\n "oauth_connector_input_specification": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "consent_url": "https://ads.tiktok.com/marketing_api/auth?{{client_id_key}}={{client_id_value}}&{{redirect_uri_key}}={{ {{redirect_uri_value}} | urlEncoder}}&{{state_key}}={{state_value}}",\n "access_token_url": "https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/",\n "access_token_params": {\n "{{ auth_code_key }}": "{{ auth_code_value }}",\n "{{ client_id_key }}": "{{ client_id_value }}",\n "{{ client_secret_key }}": "{{ client_secret_value }}"\n },\n "access_token_headers": {\n "Content-Type": "application/json",\n "Accept": "application/json"\n },\n "extract_output": ["data.access_token"],\n "client_id_key": "app_id",\n "client_secret_key": "secret",\n "auth_code_key": "auth_code"\n }\n }\n }',
1154+
title="DeclarativeOAuth Connector Specification",
11591155
)
11601156
complete_oauth_output_specification: Optional[Dict[str, Any]] = Field(
11611157
None,
@@ -1173,9 +1169,7 @@ class Config:
11731169
complete_oauth_server_input_specification: Optional[Dict[str, Any]] = Field(
11741170
None,
11751171
description="OAuth specific blob. This is a Json Schema used to validate Json configurations persisted as Airbyte Server configurations.\nMust be a valid non-nested JSON describing additional fields configured by the Airbyte Instance or Workspace Admins to be used by the\nserver when completing an OAuth flow (typically exchanging an auth code for refresh token).\nExamples:\n complete_oauth_server_input_specification={\n client_id: {\n type: string\n },\n client_secret: {\n type: string\n }\n }",
1176-
examples=[
1177-
{"client_id": {"type": "string"}, "client_secret": {"type": "string"}}
1178-
],
1172+
examples=[{"client_id": {"type": "string"}, "client_secret": {"type": "string"}}],
11791173
title="OAuth input specification",
11801174
)
11811175
complete_oauth_server_output_specification: Optional[Dict[str, Any]] = Field(
@@ -1671,9 +1665,7 @@ class CustomConfigTransformation(BaseModel):
16711665
class_name: str = Field(
16721666
...,
16731667
description="Fully-qualified name of the class that will be implementing the custom config transformation. The format is `source_<name>.<package>.<class_name>`.",
1674-
examples=[
1675-
"source_declarative_manifest.components.MyCustomConfigTransformation"
1676-
],
1668+
examples=["source_declarative_manifest.components.MyCustomConfigTransformation"],
16771669
)
16781670
parameters: Optional[Dict[str, Any]] = Field(
16791671
None,
@@ -2058,9 +2050,7 @@ class RecordSelector(BaseModel):
20582050
description="Responsible for filtering records to be emitted by the Source.",
20592051
title="Record Filter",
20602052
)
2061-
schema_normalization: Optional[
2062-
Union[SchemaNormalization, CustomSchemaNormalization]
2063-
] = Field(
2053+
schema_normalization: Optional[Union[SchemaNormalization, CustomSchemaNormalization]] = Field(
20642054
None,
20652055
description="Responsible for normalization according to the schema.",
20662056
title="Schema Normalization",
@@ -2096,12 +2086,10 @@ class DpathValidator(BaseModel):
20962086
],
20972087
title="Field Path",
20982088
)
2099-
validation_strategy: Union[ValidateAdheresToSchema, CustomValidationStrategy] = (
2100-
Field(
2101-
...,
2102-
description="The condition that the specified config value will be evaluated against",
2103-
title="Validation Strategy",
2104-
)
2089+
validation_strategy: Union[ValidateAdheresToSchema, CustomValidationStrategy] = Field(
2090+
...,
2091+
description="The condition that the specified config value will be evaluated against",
2092+
title="Validation Strategy",
21052093
)
21062094

21072095

@@ -2118,12 +2106,10 @@ class PredicateValidator(BaseModel):
21182106
],
21192107
title="Value",
21202108
)
2121-
validation_strategy: Union[ValidateAdheresToSchema, CustomValidationStrategy] = (
2122-
Field(
2123-
...,
2124-
description="The validation strategy to apply to the value.",
2125-
title="Validation Strategy",
2126-
)
2109+
validation_strategy: Union[ValidateAdheresToSchema, CustomValidationStrategy] = Field(
2110+
...,
2111+
description="The validation strategy to apply to the value.",
2112+
title="Validation Strategy",
21272113
)
21282114

21292115

@@ -2313,9 +2299,9 @@ class Config:
23132299

23142300
type: Literal["DeclarativeSource"]
23152301
check: Union[CheckStream, CheckDynamicStream]
2316-
streams: Optional[
2317-
List[Union[ConditionalStreams, DeclarativeStream, StateDelegatingStream]]
2318-
] = None
2302+
streams: Optional[List[Union[ConditionalStreams, DeclarativeStream, StateDelegatingStream]]] = (
2303+
None
2304+
)
23192305
dynamic_streams: List[DynamicDeclarativeStream]
23202306
version: str = Field(
23212307
...,
@@ -2440,9 +2426,7 @@ class Config:
24402426
extra = Extra.allow
24412427

24422428
type: Literal["DeclarativeStream"]
2443-
name: Optional[str] = Field(
2444-
"", description="The stream name.", example=["Users"], title="Name"
2445-
)
2429+
name: Optional[str] = Field("", description="The stream name.", example=["Users"], title="Name")
24462430
retriever: Union[SimpleRetriever, AsyncRetriever, CustomRetriever] = Field(
24472431
...,
24482432
description="Component used to coordinate how records are extracted across stream slices and request pages.",
@@ -2627,20 +2611,18 @@ class HttpRequester(BaseModelWithDeprecations):
26272611
description="For APIs that require explicit specification of the properties to query for, this component will take a static or dynamic set of properties (which can be optionally split into chunks) and allow them to be injected into an outbound request by accessing stream_partition.extra_fields.",
26282612
title="Query Properties",
26292613
)
2630-
request_parameters: Optional[Union[Dict[str, Union[str, QueryProperties]], str]] = (
2631-
Field(
2632-
None,
2633-
description="Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.",
2634-
examples=[
2635-
{"unit": "day"},
2636-
{
2637-
"query": 'last_event_time BETWEEN TIMESTAMP "{{ stream_interval.start_time }}" AND TIMESTAMP "{{ stream_interval.end_time }}"'
2638-
},
2639-
{"searchIn": "{{ ','.join(config.get('search_in', [])) }}"},
2640-
{"sort_by[asc]": "updated_at"},
2641-
],
2642-
title="Query Parameters",
2643-
)
2614+
request_parameters: Optional[Union[Dict[str, Union[str, QueryProperties]], str]] = Field(
2615+
None,
2616+
description="Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.",
2617+
examples=[
2618+
{"unit": "day"},
2619+
{
2620+
"query": 'last_event_time BETWEEN TIMESTAMP "{{ stream_interval.start_time }}" AND TIMESTAMP "{{ stream_interval.end_time }}"'
2621+
},
2622+
{"searchIn": "{{ ','.join(config.get('search_in', [])) }}"},
2623+
{"sort_by[asc]": "updated_at"},
2624+
],
2625+
title="Query Parameters",
26442626
)
26452627
request_headers: Optional[Union[Dict[str, str], str]] = Field(
26462628
None,
@@ -2807,9 +2789,7 @@ class QueryProperties(BaseModel):
28072789

28082790
class StateDelegatingStream(BaseModel):
28092791
type: Literal["StateDelegatingStream"]
2810-
name: str = Field(
2811-
..., description="The stream name.", example=["Users"], title="Name"
2812-
)
2792+
name: str = Field(..., description="The stream name.", example=["Users"], title="Name")
28132793
full_refresh_stream: DeclarativeStream = Field(
28142794
...,
28152795
description="Component used to coordinate how records are extracted across stream slices and request pages when the state is empty or not provided.",
@@ -2898,9 +2878,7 @@ class AsyncRetriever(BaseModel):
28982878
)
28992879
download_extractor: Optional[
29002880
Union[DpathExtractor, CustomRecordExtractor, ResponseToFileExtractor]
2901-
] = Field(
2902-
None, description="Responsible for fetching the records from provided urls."
2903-
)
2881+
] = Field(None, description="Responsible for fetching the records from provided urls.")
29042882
creation_requester: Union[HttpRequester, CustomRequester] = Field(
29052883
...,
29062884
description="Requester component that describes how to prepare HTTP requests to send to the source API to create the async server-side job.",

0 commit comments

Comments
 (0)