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

Response Headers are not possible to defined #211

Closed
mzielinski opened this issue Jan 29, 2024 · 1 comment
Closed

Response Headers are not possible to defined #211

mzielinski opened this issue Jan 29, 2024 · 1 comment
Assignees
Milestone

Comments

@mzielinski
Copy link

Currently, we are not able to define headers for responses.

It would be good to have such possibility, the same as we can do it for requests.

@dzikoysk
Copy link
Member

dzikoysk commented Jan 29, 2024

It's now possible as follows:

responses = {
    @OpenApiResponse(
        status = "400",
        content = @OpenApiContent(from = EntityDto[].class),
        headers = {
            @OpenApiParam(name = "X-Error-Message", description = "Error message", type = String.class)
        }
    )
}

You can use 6.0.1-SNAPSHOT or wait for the next stable release :)

@dzikoysk dzikoysk added this to the 6.0.1 milestone Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants