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

fix: add support for response header rendering for status code 204 #1965

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abhiandthetruth
Copy link

While having a spec like

"responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "X-Auth-Token": {
                                "description": "header containing the auth token",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                }

we don't get the responseheader hook in the generated clientservice since it is filtered out. Whereas according to HTTP spec(https://www.rfc-editor.org/rfc/rfc9110.html#section-15.3.5-1) and MDN docs(https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses) 204 can include headers

@abhiandthetruth
Copy link
Author

@ferdikoomen review?

@abhiandthetruth abhiandthetruth marked this pull request as draft January 3, 2024 20:05
@abhiandthetruth abhiandthetruth changed the title add support for response header rendering for status code 204 fix: add support for response header rendering for status code 204 Jan 3, 2024
@mrlubos
Copy link
Collaborator

mrlubos commented Jan 28, 2024

Hey @abhiandthetruth, please check out our fork, that might have what you're looking for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants