GREsau / GREsau/okapi

CookieJar header field

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
help wanted need more info rocket-okapi waiting
Dominant language
Rust
Stars
740
Forks
127
PR merge metrics
No merged PRs in 30d

Description

In development a `Cookie` header was added when `CookieJar` was present as a `FromRequest` parameter.
But this gave issue for some people. The changes has since been reverted.
More info can be found in issue #95.

Code that was reverted in d0a82a0047f27473c249b25a70c9274185bdcb43:
```rust
impl<'r> OpenApiFromRequest<'r> for &'r rocket::http::CookieJar<'r> {
fn from_request_input(gen: &mut OpenApiGenerator, _name: String, required: bool) -> Result {
let schema = gen.json_schema::();
Ok(RequestHeaderInput::Parameter(Parameter {
name: "Cookie".to_owned(),
location: "header".to_owned(),
description: None,
required,
deprecated: false,
allow_empty_value: false,
value: ParameterValue::Schema {
style: None,
explode: None,
allow_reserved: false,
schema,
example: None,
examples: None,
},
extensions: Object::default(),
}))
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.