Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up use_allof_for_refs flag option #3092

Merged
merged 1 commit into from Dec 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion protoc-gen-openapiv2/defs.bzl
Expand Up @@ -69,7 +69,8 @@ def _run_proto_gen_openapi(
proto3_optional_nullable,
openapi_configuration,
generate_unbound_methods,
visibility_restriction_selectors):
visibility_restriction_selectors,
use_allof_for_refs):
args = actions.args()

args.add("--plugin", "protoc-gen-openapiv2=%s" % protoc_gen_openapiv2.path)
Expand Down Expand Up @@ -130,6 +131,9 @@ def _run_proto_gen_openapi(
for visibility_restriction_selector in visibility_restriction_selectors:
args.add("--openapiv2_opt", "visibility_restriction_selectors=%s" % visibility_restriction_selector)

if use_allof_for_refs:
args.add("--openapiv2_opt", "use_allof_for_refs=true")

args.add("--openapiv2_opt", "repeated_path_param_separator=%s" % repeated_path_param_separator)

proto_file_infos = _direct_source_infos(proto_info)
Expand Down Expand Up @@ -232,6 +236,7 @@ def _proto_gen_openapi_impl(ctx):
openapi_configuration = ctx.file.openapi_configuration,
generate_unbound_methods = ctx.attr.generate_unbound_methods,
visibility_restriction_selectors = ctx.attr.visibility_restriction_selectors,
use_allof_for_refs = ctx.attr.use_allof_for_refs,
),
),
),
Expand Down