Skip to content

Commit

Permalink
fix: field in ContentErrorDetail can be null
Browse files Browse the repository at this point in the history
Signed-off-by: bkioshn <[email protected]>
  • Loading branch information
bkioshn committed Jan 16, 2025
1 parent 53a4ddb commit 8aebf29
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ impl Example for UnprocessableContent {
/// request.
pub(crate) struct ContentErrorDetail {
/// The location of the error
#[oai(validator(max_items = 100))]
#[oai(validator(max_items = 100), nullable)]
loc: Option<Vec<common::types::generic::error_msg::ErrorMessage>>,
/// The error message.
#[oai(validator(max_length = "1000", pattern = "^[0-9a-zA-Z].*$"))]
#[oai(validator(max_length = "1000", pattern = "^[0-9a-zA-Z].*$"), nullable)]
msg: Option<common::types::generic::error_msg::ErrorMessage>,
/// The type of error
#[oai(
rename = "type",
validator(max_length = "1000", pattern = "^[0-9a-zA-Z].*$")
validator(max_length = "1000", pattern = "^[0-9a-zA-Z].*$"),
nullable
)]
err_type: Option<common::types::generic::error_msg::ErrorMessage>,
}
Expand Down

0 comments on commit 8aebf29

Please sign in to comment.