feat(import): preserve supported HTTP contracts
This commit is contained in:
1 parent
083974c27f
commit
f8ee7c9bfe
87 files changed
+7496
-534
No files matched your search
@@ -4,6 +4,8 @@ use thiserror::Error;
|
||||
pub enum SchemaError {
|
||||
#[error("missing required field at {path}")]
|
||||
MissingField { path: String },
|
||||
#[error("unexpected field at {path}")]
|
||||
UnexpectedField { path: String },
|
||||
#[error("invalid value at {path}: expected {expected}, got {actual}")]
|
||||
InvalidType {
|
||||
path: String,
|
||||
@@ -25,6 +27,10 @@ impl SchemaError {
|
||||
Self::MissingField { path: path.into() }
|
||||
}
|
||||
|
||||
pub fn unexpected_field(path: impl Into<String>) -> Self {
|
||||
Self::UnexpectedField { path: path.into() }
|
||||
}
|
||||
|
||||
pub fn invalid_type(
|
||||
path: impl Into<String>,
|
||||
expected: &'static str,
|
||||
|
||||
Reference in new issue
Block a user