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 <leo03164@gmail.com>
This commit is contained in:
leo03164
2026-08-03 17:09:51 +08:00
committed by Rob Bradford
parent 4f6146dce2
commit d0bc9d6907

View File

@@ -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"