backstage-client 0.1.4

A Rust client library for interacting with the Backstage Catalog API. Provides type-safe access to Backstage entities with async support, filtering, and comprehensive error handling.
Documentation
use crate::entities::common::{Metadata, Relation};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Component {
    pub api_version: String,
    pub metadata: Metadata,
    pub spec: ComponentSpec,
    pub relations: Option<Vec<Relation>>, // Use Option if relations can be missing
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ComponentSpec {
    pub r#type: String,
    pub owner: String,
    pub lifecycle: String,
    pub domain: Option<String>, // Use Option if domain can be missing
    pub system: Option<String>, // Use Option if system can be missing
    pub consumes_apis: Option<Vec<String>>, // Use Option if consumes_apis can be missing
}