feat(import): resolve references and schema composition
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
use serde_json::Value;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ExternalReferenceFetchError {
|
||||
#[error("external references are disabled")]
|
||||
Disabled,
|
||||
#[error("external reference URL is invalid")]
|
||||
InvalidUrl,
|
||||
#[error("external reference target is not allowed")]
|
||||
TargetNotAllowed,
|
||||
#[error("external reference redirects are not allowed")]
|
||||
RedirectNotAllowed,
|
||||
#[error("external reference response exceeds the configured limit of {limit_bytes} bytes")]
|
||||
ResponseTooLarge { limit_bytes: usize },
|
||||
#[error("external reference endpoint returned status {status}")]
|
||||
UnexpectedStatus { status: u16 },
|
||||
#[error("external reference request failed")]
|
||||
Transport { timeout: bool, connect: bool },
|
||||
#[error("external reference fetch configuration is invalid")]
|
||||
InvalidConfiguration,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum RestAdapterError {
|
||||
#[error("invalid base url: {url}")]
|
||||
|
||||
Reference in New Issue
Block a user