Use operation_type when operation_name is empty

In the metadata operation_name may be empty. In the cli output processor
we should fallback to the operation_type when operation_name is empty.

Change-Id: Ib7aebca1a6e5982ea5fa32c7dfe62fd382689cc9
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This commit is contained in:
Artem Goncharov
2025-06-04 10:04:43 +02:00
parent 0088dd4e17
commit 9872d0f590

View File

@@ -1102,7 +1102,9 @@ class RustCliGenerator(BaseGenerator):
context = {
"operation_id": operation_id,
"operation_type": args.operation_type,
"operation_name": args.operation_name,
"operation_name": (
args.operation_name or args.operation_type
).lower(),
"command_description": common_rust.sanitize_rust_docstrings(
command_description
),