use crank_core::HttpMethod; use crate::rest::model::{ImportFinding, ImportFindingSeverity}; pub(super) fn from_lower(value: &str) -> Option { match value { "get" => Some(HttpMethod::Get), "post" => Some(HttpMethod::Post), "put" => Some(HttpMethod::Put), "patch" => Some(HttpMethod::Patch), "delete" => Some(HttpMethod::Delete), "head" => Some(HttpMethod::Head), "options" => Some(HttpMethod::Options), _ => None, } } pub(super) fn invalid_path_item() -> ImportFinding { ImportFinding { code: "invalid_path_item".to_owned(), severity: ImportFindingSeverity::Error, message: "Path Item имеет неверную структуру и не был интерпретирован.".to_owned(), operation_key: None, source_location: None, } }