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

@HeaderParam is adding header to request body instead of request header #127

Closed
ash4317 opened this issue Mar 15, 2022 · 0 comments
Closed

Comments

@ash4317
Copy link

ash4317 commented Mar 15, 2022

I am using a DemoClass as my request class in which I have one header. I am using @HeaderParam annotation to do this. Here is my DemoClass -

@Request("Request class")
data class DemoClass(
    @HeaderParam("Header required in request")
    val xyz: String,
    @PathParam("Name")
    val name: String
)

On running the app and opening the documentation, I see the header xyz in request body instead of being shown as a header. Even when I make a request, I have to add xyz inside the request body instead of the header.
Screenshot (67)
Screenshot (66)

I checked a closed issue where header name in backticks and "-" was the solution suggested, but it still didn't work for me. Someone also suggested to use @OpenAPIName with @HeaderParam but the issue still persists. Any way to fix this?

@ash4317 ash4317 closed this as completed Mar 16, 2022
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

No branches or pull requests

1 participant