Skip to content

Commit 68850ec

Browse files
style: alphabetize StreamGroup and BlockSimultaneousSyncsAction in schema definitions
Co-Authored-By: unknown <>
1 parent f000313 commit 68850ec

2 files changed

Lines changed: 54 additions & 54 deletions

File tree

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -72,43 +72,6 @@ properties:
7272
description: A description of the connector. It will be presented on the Source documentation page.
7373
additionalProperties: false
7474
definitions:
75-
StreamGroup:
76-
title: Stream Group
77-
description: >
78-
A group of streams that share a common resource and should not be read simultaneously.
79-
Streams in the same group will be blocked from concurrent reads based on the specified action.
80-
type: object
81-
required:
82-
- streams
83-
- action
84-
properties:
85-
streams:
86-
title: Streams
87-
description: >
88-
List of references to streams that belong to this group.
89-
type: array
90-
items:
91-
anyOf:
92-
- "$ref": "#/definitions/DeclarativeStream"
93-
action:
94-
title: Action
95-
description: The action to apply to streams in this group.
96-
"$ref": "#/definitions/BlockSimultaneousSyncsAction"
97-
BlockSimultaneousSyncsAction:
98-
title: Block Simultaneous Syncs Action
99-
description: >
100-
Action that prevents streams in the same group from being read concurrently.
101-
When applied to a stream group, streams with this action will be deferred if
102-
another stream in the same group is currently active.
103-
This is useful for APIs that don't allow concurrent access to the same
104-
endpoint or session. Only applies to ConcurrentDeclarativeSource.
105-
type: object
106-
required:
107-
- type
108-
properties:
109-
type:
110-
type: string
111-
enum: [BlockSimultaneousSyncsAction]
11275
AddedFieldDefinition:
11376
title: Definition Of Field To Add
11477
description: Defines the field to add on a record.
@@ -312,6 +275,21 @@ definitions:
312275
$parameters:
313276
type: object
314277
additionalProperties: true
278+
BlockSimultaneousSyncsAction:
279+
title: Block Simultaneous Syncs Action
280+
description: >
281+
Action that prevents streams in the same group from being read concurrently.
282+
When applied to a stream group, streams with this action will be deferred if
283+
another stream in the same group is currently active.
284+
This is useful for APIs that don't allow concurrent access to the same
285+
endpoint or session. Only applies to ConcurrentDeclarativeSource.
286+
type: object
287+
required:
288+
- type
289+
properties:
290+
type:
291+
type: string
292+
enum: [BlockSimultaneousSyncsAction]
315293
SelectiveAuthenticator:
316294
title: Selective Authenticator
317295
description: Authenticator that selects concrete authenticator based on config property.
@@ -4172,6 +4150,28 @@ definitions:
41724150
- "$ref": "#/definitions/ConfigRemoveFields"
41734151
- "$ref": "#/definitions/CustomConfigTransformation"
41744152
default: []
4153+
StreamGroup:
4154+
title: Stream Group
4155+
description: >
4156+
A group of streams that share a common resource and should not be read simultaneously.
4157+
Streams in the same group will be blocked from concurrent reads based on the specified action.
4158+
type: object
4159+
required:
4160+
- streams
4161+
- action
4162+
properties:
4163+
streams:
4164+
title: Streams
4165+
description: >
4166+
List of references to streams that belong to this group.
4167+
type: array
4168+
items:
4169+
anyOf:
4170+
- "$ref": "#/definitions/DeclarativeStream"
4171+
action:
4172+
title: Action
4173+
description: The action to apply to streams in this group.
4174+
"$ref": "#/definitions/BlockSimultaneousSyncsAction"
41754175
SubstreamPartitionRouter:
41764176
title: Substream Partition Router
41774177
description: Partition router that is used to retrieve records that have been partitioned according to records from the specified parent streams. An example of a parent stream is automobile brands and the substream would be the various car models associated with each branch.

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ class BearerAuthenticator(BaseModel):
4646
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
4747

4848

49+
class BlockSimultaneousSyncsAction(BaseModel):
50+
type: Literal["BlockSimultaneousSyncsAction"]
51+
52+
4953
class DynamicStreamCheckConfig(BaseModel):
5054
type: Literal["DynamicStreamCheckConfig"]
5155
dynamic_stream_name: str = Field(
@@ -2317,23 +2321,6 @@ class Config:
23172321
)
23182322

23192323

2320-
class BlockSimultaneousSyncsAction(BaseModel):
2321-
type: Literal["BlockSimultaneousSyncsAction"]
2322-
2323-
2324-
class StreamGroup(BaseModel):
2325-
streams: List[str] = Field(
2326-
...,
2327-
description='List of references to streams that belong to this group. Use JSON references to stream definitions (e.g., "#/definitions/my_stream").',
2328-
title="Streams",
2329-
)
2330-
action: BlockSimultaneousSyncsAction = Field(
2331-
...,
2332-
description="The action to apply to streams in this group.",
2333-
title="Action",
2334-
)
2335-
2336-
23372324
class Spec(BaseModel):
23382325
type: Literal["Spec"]
23392326
connection_specification: Dict[str, Any] = Field(
@@ -3080,6 +3067,19 @@ class AsyncRetriever(BaseModel):
30803067
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
30813068

30823069

3070+
class StreamGroup(BaseModel):
3071+
streams: List[str] = Field(
3072+
...,
3073+
description='List of references to streams that belong to this group. Use JSON references to stream definitions (e.g., "#/definitions/my_stream").',
3074+
title="Streams",
3075+
)
3076+
action: BlockSimultaneousSyncsAction = Field(
3077+
...,
3078+
description="The action to apply to streams in this group.",
3079+
title="Action",
3080+
)
3081+
3082+
30833083
class SubstreamPartitionRouter(BaseModel):
30843084
type: Literal["SubstreamPartitionRouter"]
30853085
parent_stream_configs: List[ParentStreamConfig] = Field(

0 commit comments

Comments
 (0)