1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#[cfg(feature = "v2")]
use crate::v2::models::{DataType, ParameterIn};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ValidationError {
#[error("Invalid $ref URI {:?}. Only relative URIs are supported.", _0)]
InvalidRefUri(String),
#[error("Reference missing in spec: {}", _0)]
MissingReference(String),
#[error(
"Parameter {:?} in path {:?} is a body but the schema is missing",
_0,
_1
)]
MissingSchemaForBodyParameter(String, String),
#[error("Path {:?} has header parameter {:?} which is not allowed", _1, _0)]
InvalidHeader(String, String),
#[cfg(feature = "v2")]
#[error(
"Parameter {:?} in path {:?} has specified {:?} type, but it's invalid for {:?} parameters",
_0,
_1,
_2,
_3
)]
InvalidParameterType(String, String, Option<DataType>, ParameterIn),
}