Skip to content

Conversation

abhishekmsingh
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

@abhishekmsingh
Copy link
Author

@ferdikoomen review?

@abhishekmsingh abhishekmsingh marked this pull request as draft January 3, 2024 20:05
@abhishekmsingh abhishekmsingh 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.

2 participants