Make get_schema_documentation a method on a SchemaDocumentationLoader trait
* LICENSE file in the root directory of this source tree.
*/
-use std::collections::HashMap;
+use std::{collections::HashMap, sync::Arc};
use serde::{Deserialize, Serialize};
use serde_json::Value;
@@ -42,6 +42,10 @@ pub struct ArgDescription {
description: Option<String>,
}
+pub trait SchemaDocumentationLoader {
+ fn get_schema_documentation(&self, schema_name: &str) -> Arc<SchemaDocumentation>;
+}
+
pub struct SchemaDocumentation {
types: HashMap<String, TypeDescription>,
}
