From d0bc9d6907d160a4b23ab50a54eaef0bea0f1fbe Mon Sep 17 00:00:00 2001 From: leo03164 Date: Mon, 3 Aug 2026 17:09:51 +0800 Subject: [PATCH] openapi: Fix generic_vhost_user property name in VmConfig The field is declared as generic_vhost_user in vmm/src/vm_config.rs without a serde rename, so the wire format uses the underscore form. The OpenAPI document names the property generic-vhost-user, which is also the only hyphenated key in the VmConfig schema. VmConfig deserialization does not reject unknown fields, so a client generated from the document sends a key that serde silently ignores: the devices are dropped on vm.create without any error. Signed-off-by: leo03164 --- vmm/src/api/openapi/cloud-hypervisor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index 8a034b095..fb894545f 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -689,7 +689,7 @@ components: type: array items: $ref: "#/components/schemas/FsConfig" - generic-vhost-user: + generic_vhost_user: type: array items: $ref: "#/components/schemas/GenericVhostUserConfig"