Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class main {
static final String LICENSE_TEXT = "license-text";
static final String STANDALONE_OPTION = "standalone";
static final String ENABLE_VIRTUAL_OPERATIONS = "enable-virtual-operations";
static final String USE_SMITHY_CLIENT = "use-smithy-client";

public static void main(String[] args) throws IOException {

Expand Down Expand Up @@ -100,6 +101,8 @@ public static void main(String[] args) throws IOException {
outputFileName = argPairs.get(OUTPUT_FILE_NAME);
}

boolean useSmithyClient = argPairs.containsKey(USE_SMITHY_CLIENT);

if (arbitraryJson != null && arbitraryJson.length() > 0) {
try {
ByteArrayOutputStream generated;
Expand Down
8 changes: 7 additions & 1 deletion tools/scripts/run_code_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def parse_arguments() -> dict:
help="Code generator raw argument to be passed through to "
"mark operation functions in service client as virtual functions. Always on by default",
action="store_true")
parser.add_argument("--use-smithy-client",
help="generate clients using smithy base client if supported",
action="store_true")

args = vars(parser.parse_args())
arg_map = {}
Expand Down Expand Up @@ -432,9 +435,12 @@ def parse_arguments() -> dict:
arg_map["list_all"] = args["list_all"] or False

raw_generator_arguments = dict()
for raw_argument in ["license-text", "namespace", "standalone"]:
for raw_argument in ["license-text", "namespace", "standalone", "use_smithy_client"]:
if args.get(raw_argument):
raw_generator_arguments[raw_argument] = args[raw_argument]
if raw_generator_arguments.get("use_smithy_client"):
del raw_generator_arguments["use_smithy_client"]
raw_generator_arguments["use-smithy-client"] = ""
arg_map["raw_generator_arguments"] = raw_generator_arguments

return arg_map
Expand Down