Skip to content

Commit 7e2c59c

Browse files
committed
[DOP-30603] Fix parsing file format options
1 parent 8d42e40 commit 7e2c59c

File tree

1 file changed

+2
-8
lines changed
  • syncmaster/schemas/v1/transfers/file

1 file changed

+2
-8
lines changed

syncmaster/schemas/v1/transfers/file/base.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ class ReadFileTransferSource(BaseModel):
3030
class ReadFileTransferTarget(BaseModel):
3131
directory_path: str
3232
# JSON format is not supported for writing
33-
file_format: CSV | JSONLine | Excel | XML | ORC | Parquet = Field(
34-
...,
35-
discriminator="type",
36-
)
33+
file_format: CSV | JSONLine | Excel | XML | ORC | Parquet = Field(discriminator="type")
3734
file_name_template: str
3835
options: dict[str, Any]
3936

@@ -58,10 +55,7 @@ def _directory_path_is_valid_path(cls, value):
5855
class CreateFileTransferTarget(BaseModel):
5956
directory_path: str
6057
# JSON format is not supported as a target
61-
file_format: CSV | JSONLine | Excel | XML | ORC | Parquet = Field(
62-
...,
63-
discriminator="type",
64-
)
58+
file_format: CSV | JSONLine | Excel | XML | ORC | Parquet = Field(discriminator="type")
6559
file_name_template: str = Field(
6660
default="{run_created_at}-{index}.{extension}",
6761
description="Template for file naming with required placeholders 'index' and 'extension'",

0 commit comments

Comments
 (0)