-
Notifications
You must be signed in to change notification settings - Fork 234
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
C# client does not generate methods when schema is the "any-type" scheme #3536
Comments
Hi @iozcelik, I'm not sure I understand what is the current behaviour and the expected one? Are you saying that for the description you've provided, kiota throws and exception? it should set the return type to "binary" instead for the time being (stream). Are you expecting something different than stream in that example? |
Hi @baywet ,
I am expecting that Kiota should create a post method with LinkIssueRequestJsonBean parameter. However it throws exception and not create post method.
Yes, when I add the else statement to my local Kiota code. It works and generate post method with LinkIssueRequestJsonBean parameter. However, I am not sure about return type. I see an example in code if the content looking like that If you debug my test code, you would see the problem. The exception:
|
Thanks for the additional information. Until we design and solve for #2548, the generator should map such cases to binary. Is this something you'd like to submit a pull request for? |
- Add culture invariant to convert of float values
Fixed #3536 and also converting float to string
In my project, I generate C# client for Atlassian OpenAPI. However one of response has the "any-type" scheme ({}).
Example part of OpenAPI file:
So I debug the source code of Kiota and find the reason. In response content has schema but actually it is not any type. The
GetExecutorMethodReturnType
method inKiotaBuilder
has an if statement and the statement acts like schema is not null. So it returns (null,null), the code throw exception atCreateOperationMethods
method while getting instance ofCodeMethod
.I add an else statement like this:
And it works. I am not an OpenAPI expert so I am not sure how Kiota acts for "any-type" schema.
My test code:
The text was updated successfully, but these errors were encountered: