diff --git a/compliance-agent/src/api/handlers/supplier.rs b/compliance-agent/src/api/handlers/supplier.rs index 48f6386..e5fcad3 100644 --- a/compliance-agent/src/api/handlers/supplier.rs +++ b/compliance-agent/src/api/handlers/supplier.rs @@ -15,12 +15,11 @@ use super::ApiResponse; use crate::pipeline::csaf_feed::{supplier_key, MongoAdvisoryStore, SupplierProviderStatus}; /// The advisories of a target's supplier, as the target editor shows them. -#[derive(Debug, Clone, PartialEq, Serialize, utoipa::ToSchema)] +#[derive(Debug, Clone, PartialEq, Serialize)] pub struct SupplierAdvisories { /// The supplier's advisories kept for the workspace. pub advisories: u64, /// When its provider was last read; none before the first refresh. - #[schema(value_type = Option, format = DateTime)] pub checked_at: Option>, /// Whether its metadata and feeds could be read then; none before the /// first refresh. @@ -29,7 +28,9 @@ pub struct SupplierAdvisories { /// Count the target's supplier advisories, with their provider's last read. /// -/// `data` is null when the target names no supplier CSAF provider. The +/// `data` holds `advisories`, `checked_at` and `reachable` (both null before +/// the first refresh), or is null when the target names no supplier CSAF +/// provider. The /// advisories are the workspace's own: a provider is read for the workspaces /// that name it, daily and right after it is set. #[utoipa::path( @@ -38,8 +39,7 @@ pub struct SupplierAdvisories { tag = "Targets", params(("id" = String, Path, description = "The target's id")), responses( - (status = 200, description = "The supplier's advisories, or null without a provider", - body = Option), + (status = 200, description = "The supplier's advisories, or null without a provider"), (status = 400, description = "Not an id"), (status = 404, description = "No such target"), (status = 401, description = "No valid bearer token"),