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;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

#[derive(Debug, Serialize, Deserialize)]
pub struct TemplateEntity {
    pub api_version: Option<String>,
    pub metadata: Metadata,
    pub spec: TemplateSpec,
    pub relations: Option<Vec<crate::entities::common::Relation>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TemplateSpec {
    pub owner: String,
    pub r#type: String,
    pub parameters: Vec<Parameter>,
    pub steps: Vec<Step>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Parameter {
    pub title: String,
    pub required: Vec<String>,
    pub properties: HashMap<String, Property>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Property {
    pub title: String,
    pub r#type: String,
    pub description: Option<String>,
    pub ui_autofocus: Option<bool>,
    pub ui_options: Option<HashMap<String, serde_json::Value>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Step {
    pub id: String,
    pub name: String,
    pub action: String,
    pub input: HashMap<String, serde_json::Value>,
}