Skip to content

Adding description to ApiV2Schema Struct property #291

Answered by ThomRoux
ThomRoux asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I figured it out:

#[derive(Serialize, Deserialize, Apiv2Schema)]
pub struct Employee {
    /// A description for the first_name property
    pub first_name: String,
    pub last_name: String,
    pub department: String,
    pub salary: i32,
    pub age: i32,
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wafflespeanut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant