pub(super) const CONSTRAINT_KEYWORDS: &[&str] = &[
"enum",
"exclusiveMaximum",
"exclusiveMinimum",
"format",
"maxItems",
"maxLength",
"maximum",
"minItems",
"minLength",
"minimum",
"multipleOf",
"pattern",
"uniqueItems",
];
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PropertyChange {
pub path: String,
pub kind: ChangeKind,
pub before: String,
pub after: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ChangeKind {
Added,
Removed,
TypeChanged,
ConstraintChanged,
}
impl ChangeKind {
#[must_use]
pub const fn label(self) -> &'static str {
match self {
Self::Added => "added",
Self::Removed => "removed",
Self::TypeChanged => "type changed",
Self::ConstraintChanged => "constraint changed",
}
}
}