Add description to field #432
Answered
by
juhaku
josejachuf
asked this question in
Q&A
-
Hi Something similar to:
|
Beta Was this translation helpful? Give feedback.
Answered by
juhaku
Jan 12, 2023
Replies: 1 comment 1 reply
-
Yes just add a doc comment for your field. Keep in mind that OpenAPI V3 does not support field descriptions on schema ref fields but only in primitive type fields. #[derive(ToSchema)]
struct Pet {
id: u64,
/// This is my field description
name: String,
age: Option<i32>,
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
josejachuf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes just add a doc comment for your field. Keep in mind that OpenAPI V3 does not support field descriptions on schema ref fields but only in primitive type fields.