-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack overflow exception generating a client #5771
Comments
With the description from https://api.hubspot.com/public/api/spec/v1/specs/Automation/Automation%20V4/versions/144908 The stackoverflow seems to be caused by the method at
The description defines the schema below with two oneOfs. "ApiFlowCreateRequest" : {
"properties" : { },
"oneOf" : [ {
"$ref" : "#/components/schemas/ApiContactFlowCreateRequest"
}, {
"$ref" : "#/components/schemas/ApiPlatformFlowCreateRequest"
} ]
}, However the referenced "ApiContactFlowCreateRequest" : {
"properties" : { },
"allOf" : [ {
"$ref" : "#/components/schemas/ApiFlowCreateRequest"
}, {
"required" : [ "actions", "blockedDates", "canEnrollFromSalesforce", "customProperties", "flowType", "isEnabled", "objectTypeId", "suppressionListIds", "timeWindows", "type" ],
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"default" : "CONTACT_FLOW",
"enum" : [ "WORKFLOW", "ACTION_SET", "UNKNOWN" ]
},
..... So as the code recursively looks for the discriminator name from the base, the oneOfs end up referencing the base again in the allOf to end up in an infinite loop. One thing I'm not sure if this is valid OpenApi or should Kiota detect the |
That's as much output I was able to capture from a trace before the SOE occurs. |
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Windows executable
Client library/SDK language
Csharp
Describe the bug
I'm using Kiota (version 1.19.1+d294e04ba7f756896878a7015df1648f9dc0bcde) to generate HubSpot clients from their OpenAPI catalog which contains ~85 separate specs. 4 of which failed with a stack overflow exception:
Expected behavior
Should generate a c# client.
How to reproduce
Open API description file
https://api.hubspot.com/public/api/spec/v1/specs/Automation/Automation%20V4/versions/144908
https://api.hubspot.com/public/api/spec/v1/specs/CRM/Exports/versions/95922
https://api.hubspot.com/public/api/spec/v1/specs/Conversations/Conversations%20Inbox%20&%20Messages/versions/54902
Kiota Version
1.19.1+d294e04ba7f756896878a7015df1648f9dc0bcde
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
None
Configuration
Debug output
--debug
flag didn't work.Other information
No response
The text was updated successfully, but these errors were encountered: