#[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),
}