Skip to content
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

200 and 204 response does not return message body stream (application/xml) - C# generated code #6110

Open
AndrewZenith opened this issue Feb 5, 2025 · 2 comments
Labels
Needs: Attention 👋 type:question An issue that's a question

Comments

@AndrewZenith
Copy link

If the response has the possibility of no content (204) as well as with content (200), then the generated code does not give a response stream for the response body.

responses:
"200":
description: OK
content:
application/xml:
"204":
description: No Content

My expectation would be that it would!

@andrueastman
Copy link
Member

Thanks for raising this @AndrewZenith

Any chance you can share the configuration parameters you are pssing to Kiota to generate the client? I suspect the issue here is related to the code here.

https://github.com/microsoft/kiota/blob/c9d44bf80225f44a2e54bdd39feb8093da7625ef/src/Kiota.Builder/KiotaBuilder.cs#L1333C29-L1333C63

@andrueastman andrueastman transferred this issue from microsoft/kiota-dotnet Feb 6, 2025
@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question labels Feb 6, 2025
@andrueastman andrueastman moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Feb 7, 2025
@AndrewZenith
Copy link
Author

Fri 07 02 2025 19:35:46: Executing:
Fri 07 02 2025 19:35:46: kiota --version
Fri 07 02 2025 19:35:46: 1.20.0+81bdb1bf13383a749f794d47926d09733d2d7be1
Fri 07 02 2025 19:35:46: Executing:
Fri 07 02 2025 19:35:46: kiota generate -l CSharp -d "D:\projects\MyCustoms\webapi\REST\HMRC\ICS2Outcomes\ICS2Outcomes.yaml" -o "C:\Users\andre\AppData\Local\Temp\4a8110b4-d130-454c-bf2b-e8eefdc27ed1" -n webapi.REST.HMRC.ICS2Outcomes --type-access-modifier Public
Fri 07 02 2025 19:35:47: A newer version of Kiota (1.23.0) is available. You are currently using version 1.20.0. https://aka.ms/get/kiota
Fri 07 02 2025 19:35:47: warn: Kiota.Builder.KiotaBuilder[0]
Fri 07 02 2025 19:35:47: OpenAPI warning: #/ - Multiple servers entries were found in the OpenAPI description. Only the first one will be used. The root URL can be set manually with the request adapter.
Fri 07 02 2025 19:35:48:
Fri 07 02 2025 19:35:48: Generation completed successfully
Fri 07 02 2025 19:35:48: Client base url set to https://test-api.service.hmrc.gov.uk

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention 👋 type:question An issue that's a question
Projects
Status: Waits for author 🔁
Development

No branches or pull requests

3 participants