fix(api): the supplier advisories route describes its enveloped answer (#1025)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m31s
CI / Check (pull_request) Successful in 20m56s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m31s
CI / Check (pull_request) Successful in 20m56s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
This commit is contained in:
1 parent
ef85356b4b
commit
067113f7ec
1 file changed
+5
-5
@@ -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<String>, format = DateTime)]
|
||||
pub checked_at: Option<chrono::DateTime<chrono::Utc>>,
|
||||
/// 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<SupplierAdvisories>),
|
||||
(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"),
|
||||
|
||||
Reference in new issue
Block a user