manta_shared/types/api/
configuration_analysis.rs

1//! Wire shape for `GET /api/v1/configurations`.
2//!
3//! One row per CFS configuration, carrying the full
4//! `CfsConfigurationResponse` and a `safe_to_delete` verdict derived
5//! from CFS components (a configuration is unsafe iff some component
6//! lists it as `desired_config`).
7
8use manta_backend_dispatcher::types::cfs::cfs_configuration_response::CfsConfigurationResponse;
9use serde::{Deserialize, Serialize};
10use utoipa::ToSchema;
11
12/// One row of the configuration-deletion-safety analysis.
13///
14/// Configuration-centric counterpart to
15/// [`super::analysis::BackendSummary`]; one entry per CFS
16/// configuration the caller can see.
17#[derive(Debug, Serialize, Deserialize, ToSchema)]
18pub struct ConfigurationAnalysis {
19  /// Full CFS configuration record as returned by CFS. `CfsConfigurationResponse`
20  /// lives in `manta-backend-dispatcher` (third-party, no ToSchema), so the
21  /// OpenAPI schema falls back to `serde_json::Value`.
22  #[schema(value_type = serde_json::Value)]
23  pub configuration: CfsConfigurationResponse,
24  /// `true` if no CFS component lists this configuration as its
25  /// `desired_config`. The verdict is components-only; deletion may
26  /// still be unsafe if a BSS-referenced image was built from this
27  /// configuration — that fuller check isn't surfaced on this wire
28  /// shape.
29  pub safe_to_delete: bool,
30}