Skip to content

Commit 4903314

Browse files
committed
Add: Ignore for empty name_mappings.
1 parent e99cd74 commit 4903314

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/openapi_generator.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ def _new_generator_command(ctx, declared_dir, rjars):
5151
reserved_words_mappings = ",".join(ctx.attr.reserved_words_mappings),
5252
)
5353

54-
gen_cmd += ' --name-mappings "{mappings}"'.format(
55-
mappings = _comma_separated_pairs(ctx.attr.name_mappings),
56-
)
54+
if ctx.attr.name_mappings:
55+
gen_cmd += ' --name-mappings "{mappings}"'.format(
56+
mappings = _comma_separated_pairs(ctx.attr.name_mappings),
57+
)
5758

5859
if ctx.attr.config:
5960
gen_cmd += " --config {config}".format(

0 commit comments

Comments
 (0)