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

CookieJar header field #97

Open
ralpha opened this issue Jun 7, 2022 · 0 comments
Open

CookieJar header field #97

ralpha opened this issue Jun 7, 2022 · 0 comments
Labels
help wanted Extra attention is needed need more info Need more info to be able to fix it rocket-okapi This affects the rocket-okapi crate waiting This issue depends on something else or no action can be taken right now

Comments

@ralpha
Copy link
Collaborator

ralpha commented Jun 7, 2022

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 d0a82a0:

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::<String>();
        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(),
        }))
    }
}
ralpha added a commit that referenced this issue Jun 7, 2022
@ralpha ralpha added help wanted Extra attention is needed need more info Need more info to be able to fix it waiting This issue depends on something else or no action can be taken right now rocket-okapi This affects the rocket-okapi crate labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed need more info Need more info to be able to fix it rocket-okapi This affects the rocket-okapi crate waiting This issue depends on something else or no action can be taken right now
Projects
None yet
Development

No branches or pull requests

1 participant