Skip to content

Commit 8f7c726

Browse files
Expose protocol-version to CLI
1 parent 5ccb4e3 commit 8f7c726

File tree

1 file changed

+8
-1
lines changed
  • src/replit_river/codegen

1 file changed

+8
-1
lines changed

src/replit_river/codegen/run.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ def main() -> None:
3838
action="store_true",
3939
default=False,
4040
)
41+
client.add_argument(
42+
"--protocol-version",
43+
help="Generate river v2 clients",
44+
action="store",
45+
default="v1.1",
46+
choices=["v1.1", "v2.0"],
47+
)
4148
client.add_argument("schema", help="schema file")
4249
args = parser.parse_args()
4350

@@ -62,7 +69,7 @@ def file_opener(path: Path) -> TextIO:
6269
client_name=args.client_name,
6370
typed_dict_inputs=args.typed_dict_inputs,
6471
file_opener=file_opener,
65-
protocol_version="v1.1",
72+
protocol_version=args.protocol_version,
6673
)
6774
else:
6875
raise NotImplementedError(f"Unknown command {args.command}")

0 commit comments

Comments
 (0)