Skip to content

Commit acd7a18

Browse files
style: alphabetize StreamGroup and BlockSimultaneousSyncsAction in schema definitions
Co-Authored-By: unknown <>
1 parent 756a966 commit acd7a18

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

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.
@@ -4151,6 +4129,28 @@ definitions:
41514129
- "$ref": "#/definitions/ConfigRemoveFields"
41524130
- "$ref": "#/definitions/CustomConfigTransformation"
41534131
default: []
4132+
StreamGroup:
4133+
title: Stream Group
4134+
description: >
4135+
A group of streams that share a common resource and should not be read simultaneously.
4136+
Streams in the same group will be blocked from concurrent reads based on the specified action.
4137+
type: object
4138+
required:
4139+
- streams
4140+
- action
4141+
properties:
4142+
streams:
4143+
title: Streams
4144+
description: >
4145+
List of references to streams that belong to this group.
4146+
type: array
4147+
items:
4148+
anyOf:
4149+
- "$ref": "#/definitions/DeclarativeStream"
4150+
action:
4151+
title: Action
4152+
description: The action to apply to streams in this group.
4153+
"$ref": "#/definitions/BlockSimultaneousSyncsAction"
41544154
SubstreamPartitionRouter:
41554155
title: Substream Partition Router
41564156
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(
@@ -2305,23 +2309,6 @@ class Config:
23052309
)
23062310

23072311

2308-
class BlockSimultaneousSyncsAction(BaseModel):
2309-
type: Literal["BlockSimultaneousSyncsAction"]
2310-
2311-
2312-
class StreamGroup(BaseModel):
2313-
streams: List[str] = Field(
2314-
...,
2315-
description='List of references to streams that belong to this group. Use JSON references to stream definitions (e.g., "#/definitions/my_stream").',
2316-
title="Streams",
2317-
)
2318-
action: BlockSimultaneousSyncsAction = Field(
2319-
...,
2320-
description="The action to apply to streams in this group.",
2321-
title="Action",
2322-
)
2323-
2324-
23252312
class Spec(BaseModel):
23262313
type: Literal["Spec"]
23272314
connection_specification: Dict[str, Any] = Field(
@@ -3068,6 +3055,19 @@ class AsyncRetriever(BaseModel):
30683055
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
30693056

30703057

3058+
class StreamGroup(BaseModel):
3059+
streams: List[str] = Field(
3060+
...,
3061+
description='List of references to streams that belong to this group. Use JSON references to stream definitions (e.g., "#/definitions/my_stream").',
3062+
title="Streams",
3063+
)
3064+
action: BlockSimultaneousSyncsAction = Field(
3065+
...,
3066+
description="The action to apply to streams in this group.",
3067+
title="Action",
3068+
)
3069+
3070+
30713071
class SubstreamPartitionRouter(BaseModel):
30723072
type: Literal["SubstreamPartitionRouter"]
30733073
parent_stream_configs: List[ParentStreamConfig] = Field(

0 commit comments

Comments
 (0)