Skip to main content

objectiveai_cli_sdk/output/notification/
schema.rs

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