adapter_schema.rs

 1use std::borrow::Cow;
 2
 3use gpui::SharedString;
 4use schemars::JsonSchema;
 5use serde::{Deserialize, Serialize};
 6
 7/// JSON schema for a specific adapter
 8#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
 9pub struct AdapterSchema {
10    /// The adapter name identifier
11    pub adapter: SharedString,
12    /// The JSON schema for this adapter's configuration
13    pub schema: Cow<'static, serde_json::Value>,
14}
15
16#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
17#[serde(transparent)]
18pub struct AdapterSchemas(pub Vec<AdapterSchema>);