mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-29 00:01:06 +00:00
Preserve main quota, Guardian, and WebSocket fixes alongside the new provider and module organization. Co-authored-by: Codex <noreply@openai.com>
19 lines
738 B
Rust
19 lines
738 B
Rust
//! 验证插件元数据兼容新增字段,同时保留已知字段的类型约束
|
|
|
|
mod contract;
|
|
use gateway_admin::model::plugins::PluginArtifactMetadata;
|
|
use serde_json::{Value, json};
|
|
|
|
fn metadata() -> Value {
|
|
json!({
|
|
"pluginId": "test.example", "version": "1.0.0", "name": "example",
|
|
"displayName": "Example", "publisher": "test", "description": "Example plugin",
|
|
"license": "MIT", "sha256": "a".repeat(64), "platforms": ["linux-x86_64"],
|
|
"contributes": {"middleware": {
|
|
"id": "test.example.middleware", "version": 3,
|
|
"stages": [], "inputFormats": [], "outputFormats": []
|
|
}},
|
|
"configurationSchema": {}, "secretFields": [], "stateNamespaces": []
|
|
})
|
|
}
|