objectiveai_sdk/cli/output/notification/schema.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// A single JSON Schema document, emitted by `schemas <category> <type> get`.
5/// The body is the raw schema as a `Value` since JSON Schemas have an
6/// open recursive structure.
7///
8/// Wire: `{"type":"notification","schema":{...JSON Schema...}}`.
9#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
10#[schemars(rename = "cli.output.notification.Schema")]
11pub struct Schema {
12 pub schema: serde_json::Value,
13}
14
15/// Names of the schemas at the current namespace level, emitted by
16/// `schemas list` and per-category `schemas <category> list` commands.
17///
18/// Wire: `{"type":"notification","schemas":["name1","name2",...]}`.
19#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
20#[schemars(rename = "cli.output.notification.Schemas")]
21pub struct Schemas {
22 pub schemas: Vec<String>,
23}