Closed abdullahabro closed 5 months ago
Not able to add description to a particular attribute in a struct using schema attrtibute
#[derive(Serialize, Deserialize, ToSchema, Clone)] pub struct CreateOrderRequest { #[schema(example = "abc-123", description = "unique identifier assigned to the client")] pub client_id: String }
Getting error
unexpected attribute: description, expected any of: example, value_type, format, default, write_only, read_only, xml, inline, nullable, rename, multiple_of, maximum, minimum, exclusive_maximum, exclusive_minimum, max_length, min_length, pattern, max_items, min_items, schema_with, additional_properties, required, deprecated
The description comes from the comment of the field https://docs.rs/utoipa/latest/utoipa/derive.ToSchema.html.
@juhaku thanks for letting me know , i completely missed it
Not able to add description to a particular attribute in a struct using schema attrtibute
Getting error