feat(import): add deterministic OpenAPI normalized IR
This commit is contained in:
1 parent
bc03c33387
commit
6c2a3712d8
22 files changed
+6051
-352
No files matched your search
@@ -11,6 +11,15 @@ pub fn document_finding(code: &str, message: impl Into<String>) -> ImportFinding
|
||||
}
|
||||
}
|
||||
|
||||
pub fn document_blocker(code: &str, message: impl Into<String>) -> ImportFinding {
|
||||
ImportFinding {
|
||||
code: code.to_owned(),
|
||||
severity: ImportFindingSeverity::Error,
|
||||
message: message.into(),
|
||||
operation_key: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn operation_finding(
|
||||
operation_key: &str,
|
||||
code: &str,
|
||||
@@ -45,6 +54,9 @@ pub fn operation_recommendations(operation: &RestImportOperation) -> Vec<ImportF
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.is_empty()
|
||||
&& !findings
|
||||
.iter()
|
||||
.any(|finding| finding.code == "missing_operation_id")
|
||||
{
|
||||
findings.push(operation_finding(
|
||||
&operation.key,
|
||||
|
||||
Reference in new issue
Block a user