zagens-runtime-adapters 0.7.5

Runtime tool/MCP/persist adapters for Zagens sidecar (D16 E1-a)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shared `schemars` helpers for HTTP/OpenAPI export (D8).

use schemars::{Schema, SchemaGenerator};

/// `PathBuf` serializes as a string on the wire.
pub fn path_as_string(_gen: &mut SchemaGenerator) -> Schema {
    serde_json::from_value(serde_json::json!({ "type": "string" })).expect("path schema")
}

/// `Vec<PathBuf>` serializes as a string array on the wire.
pub fn path_vec_as_strings(_gen: &mut SchemaGenerator) -> Schema {
    serde_json::from_value(serde_json::json!({
        "type": "array",
        "items": { "type": "string" }
    }))
    .expect("path vec schema")
}