Skip to content

Unsure on the generated request for 204 (and by extension 201) requests, with no content #6411

Answered by baywet
JSparshottO2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JSparshottO2
Thank you for using kiota and for reaching out.

In kiota, default should only be used for error responses (generating the exception types)

if (operation.Responses.TryGetValue("default", out var defaultResponse) && defaultResponse.GetResponseSchema(config.StructuredMimeTypes) is { } errorSchema)

I believe this case is what you're going through.

(null, _) => operation.Responses!

The conditions line 1450 and 1455 are wrong, they should also exclude: default, 4XX and 5XX

Is this something you'd like to submit a pull requ…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JSparshottO2
Comment options

@baywet
Comment options

baywet Apr 4, 2025
Collaborator

@JSparshottO2
Comment options

Answer selected by baywet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants