1#![allow(clippy::return_self_not_must_use)]
26
27mod content;
28mod plugin;
29mod raw_source;
30mod schema;
31
32pub use content::{ContentMetadata, ContentTypeId, ServeableContent, ValidationReport};
33pub use plugin::{ContentPlugin, DatasetPlugin, PluginRegistry, RenderHints};
34pub use raw_source::{RawSource, RawSourceConfig, SourceType};
35pub use schema::{Constraint, ContentSchema, FieldDefinition, FieldType, ValidatorDefinition};
36
37#[cfg(test)]
38mod tests {
39 use super::*;
40
41 #[test]
42 fn test_plugin_registry_creation() {
43 let registry = PluginRegistry::new();
44 assert!(registry.get(&ContentTypeId::dataset()).is_some());
45 }
46
47 #[test]
48 fn test_content_type_id_constants() {
49 assert_eq!(ContentTypeId::dataset().as_str(), "alimentar.dataset");
50 assert_eq!(ContentTypeId::course().as_str(), "assetgen.course");
51 assert_eq!(ContentTypeId::model().as_str(), "aprender.model");
52 assert_eq!(ContentTypeId::registry().as_str(), "alimentar.registry");
53 assert_eq!(ContentTypeId::raw().as_str(), "alimentar.raw");
54 }
55}