Skip to content

Feature: support extensions in utoipa::IntoParams attribute macros #1473

@aybeshlikyan

Description

@aybeshlikyan

Hello, this is a great project!!
I saw the MR that added support for extensions on the path macro and param tuples: #1292

I'm hoping to extend (pun intended) the support further to be able to specify extensions(...) as part of the #[into_params] and #[params] attribute macros as well, like this:

#[derive(Debug, Clone, utoipa::IntoParams)]
#[into_params(parameter_in = Query, extensions(("x-on-all-params" = json!(true))))]
pub struct ParamStruct {
    /// A param.
    pub param_1: i32,

    /// Another param.
    #[param(extensions(("x-on-one-param" = json!({ "key": "value" }))))]
    pub param_2: String,
}

I have the changes working on a local branch and would love to put it up for review!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions