Skip to main content

firefly_iii/models/
validation_error_response.rs

1/*
2 * Firefly III API v6.4.14
3 *
4 * This is the documentation of the Firefly III API. Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. <br><br> Please keep in mind that the demo site does **not** accept requests from `curl`, `colly`, `wget`, etc. You must use a browser or a tool like Insomnia to make your test requests. <br><br> To learn more about the idiosyncrasies of this API, please read about the API in the [Firefly III API documentation](https://docs.firefly-iii.org/references/firefly-iii/api/). <br><br> <small>This file was last generated on 2025-12-26 @ 15:17:41 (Europe/Amsterdam)</small>
5 *
6 * The version of the OpenAPI document: v6.4.14
7 * Contact: james@firefly-iii.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11#![allow(unused_imports)]
12
13use crate::models::{self, *};
14use std::fmt;
15
16#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
17pub struct ValidationErrorResponse {
18    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
19    pub message: Option<String>,
20    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
21    pub errors: Option<models::ValidationErrorResponseErrors>,
22}
23
24impl ValidationErrorResponse {
25    pub fn new() -> ValidationErrorResponse {
26        ValidationErrorResponse {
27            message: None,
28            errors: None,
29        }
30    }
31}
32
33impl fmt::Display for ValidationErrorResponse {
34    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35        match serde_json::to_string(self) {
36            Ok(json) => write!(f, "{}", json),
37            Err(_) => write!(f, "{{{{}}}}"),
38        }
39    }
40}