From 9872d0f5901ae4d8f52fd8fa3ffbe01ae95bd889 Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: Wed, 4 Jun 2025 10:04:43 +0200 Subject: [PATCH] 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 --- codegenerator/rust_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codegenerator/rust_cli.py b/codegenerator/rust_cli.py index b4d5f91..cd637d8 100644 --- a/codegenerator/rust_cli.py +++ b/codegenerator/rust_cli.py @@ -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 ),