openapi_trustfall_adapter/
errors.rs1use std::path::PathBuf;
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum OpenAPIAdapterErrors {
7 #[error("Path is not a directory {0}")]
8 PathIsNotADirectory(PathBuf),
9 #[error("Path doesn't exist {0}")]
10 PathDoesNotExist(PathBuf),
11 #[error("Failed to find YAML files: {0}")]
12 FilesNotFound(PathBuf),
13 #[error("Failed to merge YAML files: {0}")]
14 FailedToMerge(String),
15 #[error("Failed to open file")]
16 FailedToOpenFile(#[from] std::io::Error),
17 #[error("Failed to serialize to an OpenAPI struct")]
18 FailedToSerializeToOpenAPI(#[from] serde_yaml::Error),
19}