We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current, if you try to set multiple Set-Cookie headers, only the last one is used:
Set-Cookie
struct Api; #[derive(ApiResponse)] pub enum FooResponse { #[oai(status = 200)] SetCookie( #[oai(header = "Set-Cookie")] String, #[oai(header = "Set-Cookie")] String, ), } #[OpenApi] impl Api { #[oai(path = "/foo", method = "get")] pub async fn foo(&self) -> FooResponse { FooResponse::SetCookie("foo=1".into(), "bar=1".into()) } }
$ curl -I http://localhost:3000/foo HTTP/1.1 200 OK set-cookie: bar=1 date: Fri, 11 Oct 2024 16:21:35 GMT
This is a limitation of the current OpenAPI spec: OAI/OpenAPI-Specification#1237.
But is there a way to work around this? Is there a way to set additional headers in the response object beyond what is annotated in the struct?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description of the feature
Current, if you try to set multiple
Set-Cookie
headers, only the last one is used:This is a limitation of the current OpenAPI spec: OAI/OpenAPI-Specification#1237.
But is there a way to work around this? Is there a way to set additional headers in the response object beyond what is annotated in the struct?
The text was updated successfully, but these errors were encountered: