Replies: 1 comment
-
Well, this only works if the response is a pointer to the response type. That's not the case if default error is used. Since all the setter methods have pointer receivers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I want to send a correlation ID header with the response. This should be done for each request, hence I am usually doing it via middleware. Something like this:
The problem is that I have this header in the Spec for my responses.
The result is that they will be part of the generated response type. And since I am not setting it on this response type from my handler, it will be empty or filled with some useless default. The below is from the generated response encode code:
I am not sure how I could handle this situation in a nice way. I managed to do something like this but its feels cumbersome:
Beta Was this translation helpful? Give feedback.
All reactions