openapi_types/openapi/
spec_violation.rs

1#[derive(Debug, Clone, PartialEq)]
2pub enum SpecViolation {
3    FieldNotExist { field: String },
4    UnknownDataType { found: String },
5    TypeMismatch { expected: String, found: String },
6}
7
8impl From<SpecViolation> for crate::Error {
9    fn from(reason: SpecViolation) -> Self {
10        crate::Error::SpecViolation(crate::SpecViolation::OpenApi(reason))
11    }
12}