Skip to content

Commit

Permalink
Add support for --package-name parameter (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
SowjanyaVemu committed Feb 28, 2023
1 parent fb7e302 commit 314cd2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/openapi_generator.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def _new_generator_command(ctx, declared_dir, rjars):
reserved_words_mappings = ",".join(ctx.attr.reserved_words_mappings),
)

if ctx.attr.package_name:
gen_cmd += " --package-name {package}".format(
package = ctx.attr.package_name,
)

if ctx.attr.api_package:
gen_cmd += " --api-package {package}".format(
package = ctx.attr.api_package,
Expand Down Expand Up @@ -158,6 +163,7 @@ _openapi_generator = rule(
],
),
"generator": attr.string(mandatory = True),
"package_name": attr.string(),
"api_package": attr.string(),
"invoker_package": attr.string(),
"model_package": attr.string(),
Expand Down

0 comments on commit 314cd2d

Please sign in to comment.