You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the (POST) https://{pc-ip}:9440/api/vmm/v4.1/content/templates/{extId}/$actions/deploy endpoint.
Expected behaviour
When creating the request, I would expect the nested objects/schemas to have their specific types as properties, rather than the Dictionary<string, object>. In this case I would expect the OverrideVmConfigMap property to be an object that looks like this:
As per the OpenAPI specs Schmea section (Line 47,498):
vmm.v4.1.content.VmConfigOverride:
type: objectproperties:
name:
maxLength: 80minLength: 1type: stringdescription: VM name.example: LinuxServer_VMnumSockets:
minimum: 1type: integerdescription: Number of vCPU sockets.format: int32example: 21numCoresPerSocket:
minimum: 1type: integerdescription: Number of cores per socket.format: int32example: 36numThreadsPerCore:
minimum: 1type: integerdescription: Number of threads per core.format: int32example: 71memorySizeBytes:
minimum: 1type: integerdescription: Memory size in bytes.format: int64example: 61nics:
maxItems: 2147483647minItems: 0type: arraydescription: NICs attached to the VM.items:
$ref: '#/components/schemas/vmm.v4.1.ahv.config.Nic'guestCustomization:
$ref: '#/components/schemas/vmm.v4.1.ahv.config.GuestCustomizationParams'additionalProperties: falsedescription: Overrides specification for VM creation from a template.
And the Redoc:
Actual behaviour
The class only has a singular property, public IDictionary<string, object> AdditionalData { get; set; }, and not the nested types.
This would require me to manually put in the KeyValue pairs, and it seems like a very brittle solution.
Is this me misunderstanding something? Are the nested types / schema references not supposed to be generated as models?
I'm still new to Kiota, so any help / pointers in the right direction would be much appreciated 🙏
The class implements the IAdditionalDataHolder interface.
I've tried adding the --additional-data false to the script, which entirely removes the IDictionary<string, object> AdditionalData property, but it does not turn the nested types into properties.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Kiota team,
I've tried to generate a SDK from the Nutanix 4.1 VMM OpenAPI specification, found at
https://developers.nutanix.com/api-reference?namespace=vmm&version=v4.1
I am trying to use the
(POST) https://{pc-ip}:9440/api/vmm/v4.1/content/templates/{extId}/$actions/deploy
endpoint.Expected behaviour
When creating the request, I would expect the nested objects/schemas to have their specific types as properties, rather than the
Dictionary<string, object>
. In this case I would expect theOverrideVmConfigMap
property to be an object that looks like this:As per the OpenAPI specs Schmea section (Line 47,498):
And the Redoc:

Actual behaviour
The class only has a singular property,

public IDictionary<string, object> AdditionalData { get; set; }
, and not the nested types.This would require me to manually put in the KeyValue pairs, and it seems like a very brittle solution.
Repro steps
I've used this script to generate the client:
Is this me misunderstanding something? Are the nested types / schema references not supposed to be generated as models?
I'm still new to Kiota, so any help / pointers in the right direction would be much appreciated 🙏
Additional Info / steps I've tried
Versions used
Kiota:
1.27.0+278d4c17bfbc9fff8d8a1618bd95b43b1e3f7f4d
.NET SDK:
9.0.302
IAdditionalDataHolder
The class implements the
IAdditionalDataHolder
interface.I've tried adding the
--additional-data false
to the script, which entirely removes theIDictionary<string, object> AdditionalData
property, but it does not turn the nested types into properties.Beta Was this translation helpful? Give feedback.
All reactions