Add SourceProperty to LicensedArticle

This commit is contained in:
Kitaiti Makoto 2022-03-07 00:15:19 +09:00
parent 23f273e5e8
commit 216855d3a7

View File

@ -573,7 +573,7 @@ where
} }
} }
pub type LicensedArticle = Ext1<ApObject<Article>, Licensed07>; pub type LicensedArticle = Ext2<ApObject<Article>, Licensed07, SourceProperty>;
pub trait ToAsString { pub trait ToAsString {
fn to_as_string(&self) -> Option<String>; fn to_as_string(&self) -> Option<String>;
@ -689,6 +689,12 @@ mod tests {
Licensed07 { Licensed07 {
license: "CC-0".into(), license: "CC-0".into(),
}, },
SourceProperty {
source: Source {
content: "content".into(),
media_type: "text/plain".into(),
},
},
); );
let expected = json!({ let expected = json!({
"type": "Article", "type": "Article",