OpenAPI artifacts and preserve discovery contracts removed

This commit is contained in:
Alexey
2026-11-08 14:34:39 +03:00
parent d5e01460de
commit 6d65074389
2 changed files with 1 additions and 13 deletions
-2
View File
@@ -85,7 +85,6 @@ pub(super) struct CapabilitiesData {
schema_version: u32,
software_version: &'static str,
config_schema: &'static str,
openapi_artifact: &'static str,
read_only: bool,
availability_scope: &'static str,
operations: Vec<OperationCapability>,
@@ -199,7 +198,6 @@ fn build_capabilities(
schema_version: SCHEMA_VERSION,
software_version: env!("CARGO_PKG_VERSION"),
config_schema: "/v1/config/schema",
openapi_artifact: "docs/Architecture/API/openapi-v1.json",
read_only: config.server.api.read_only,
availability_scope: "feature_and_runtime_source_prerequisites_not_request_success",
operations: entries,
+1 -11
View File
@@ -127,11 +127,7 @@ fn example_path(path: &str) -> String {
}
#[test]
fn operation_catalog_matches_routing_methods_and_openapi() {
let document: Value = serde_json::from_str(include_str!(
"../../../docs/Architecture/API/openapi-v1.json"
))
.unwrap();
fn operation_catalog_matches_routing_methods() {
let mut paths = BTreeMap::<String, BTreeSet<String>>::new();
let mut ids = BTreeSet::new();
for operation in operations().unwrap() {
@@ -153,11 +149,6 @@ fn operation_catalog_matches_routing_methods_and_openapi() {
allowed.split(", ").any(|method| method == operation.method),
"{path}: {allowed}"
);
let spec = &document["paths"][path][operation.method.to_lowercase()];
assert!(spec.is_object(), "missing OpenAPI operation: {path}");
for status in &operation.success {
assert!(spec["responses"][status.to_string()].is_object());
}
}
}
for (path, methods) in &paths {
@@ -168,7 +159,6 @@ fn operation_catalog_matches_routing_methods_and_openapi() {
"{path}"
);
}
assert_eq!(paths.len(), document["paths"].as_object().unwrap().len());
// Both tables are independent: a newly dispatched fixed route cannot silently
// disappear from discovery because a maintainer omitted its catalog entry.
for source in [