diff --git a/src/api/discovery.rs b/src/api/discovery.rs index b0828f6..103f6df 100644 --- a/src/api/discovery.rs +++ b/src/api/discovery.rs @@ -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, @@ -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, diff --git a/src/api/discovery/tests.rs b/src/api/discovery/tests.rs index 8f48852..6c8c194 100644 --- a/src/api/discovery/tests.rs +++ b/src/api/discovery/tests.rs @@ -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::>::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 [