-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Description
The documentation (https://docs.rs/utoipa/latest/utoipa/derive.ToSchema.html#named-field-struct-optional-configuration-options-for-schema) states that it is possible to have description on the field. However when trying to annotate a struct field with:
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
#[derive(ToSchema)]
pub struct SomeRequest {
#[schema(
example = "John",
description = "First name for the requester",
)]
name: String,
}
It results in an error, when compiling:
error: unexpected attribute: description, expected any of: example, examples, 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, content_encoding, content_media_type, ignore, no_recursion
--> src/lib.rs:79:9
|
79 | description = "a game for which the optimization should be done"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels