(C#) Nested schema properties treated as Dictionary<string, object> #6759
Unanswered
Christian Arensbak (carensbak)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/deployendpoint.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 theOverrideVmConfigMapproperty 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.302IAdditionalDataHolder
The class implements the
IAdditionalDataHolderinterface.I've tried adding the
--additional-data falseto the script, which entirely removes theIDictionary<string, object> AdditionalDataproperty, but it does not turn the nested types into properties.All reactions