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

Support more basic types, even customized structs in oai parameter #525

Open
RWDai opened this issue Mar 7, 2023 · 2 comments
Open

Support more basic types, even customized structs in oai parameter #525

RWDai opened this issue Mar 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@RWDai
Copy link

RWDai commented Mar 7, 2023

Description of the feature

https://docs.rs/poem-openapi/latest/poem_openapi/derive.Object.html
oai parameter default is only support bool,string.
Can we support more basic types, even customized structs?

Code example (if possible)

/// example
#[derive(Object)]
struct example {
    
    id: String,

    #[oai(default=3306)]
    mysql_port: u32,
}
@RWDai RWDai added the enhancement New feature or request label Mar 7, 2023
@attila-lin
Copy link
Collaborator

Maybe looks like serde-rs/serde#368 ?

@RWDai
Copy link
Author

RWDai commented Mar 11, 2023

Maybe looks like serde-rs/serde#368 ?

yes,is it feasible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants