//! DTOs for subject and predicate discovery endpoints.

use serde::{Deserialize, Serialize};
use utoipa::{IntoParams, ToSchema};

/// Query parameters for `GET /v1/subjects`.
#[derive(Debug, Deserialize, IntoParams)]
pub struct ListSubjectsParams {
    /// Optional prefix filter for subject names.
    #[param(example = "sema")]
    pub q: Option<String>,

    /// Maximum number of subjects to return (default 100, max 1000).
    #[param(example = 100)]
    pub limit: Option<usize>,
}

/// Response for `GET /v1/subjects`.
#[derive(Debug, Serialize, ToSchema)]
pub struct ListSubjectsResponse {
    /// List of matching subject strings.
    pub subjects: Vec<String>,
    /// Total number of subjects matching the filter (before limit).
    pub total_count: usize,
}

/// Response for `GET /v1/subjects/:subject/predicates`.
#[derive(Debug, Serialize, ToSchema)]
pub struct ListPredicatesResponse {
    /// The subject these predicates belong to.
    pub subject: String,
    /// List of predicate strings for this subject.
    pub predicates: Vec<String>,
}
