Currently, the property Attachement in Object struct and some other struct has type Item. Since from the Activitypub Vocabulary Spec (Example 66) shown that attachment field can be JSON array, so shouldn't Attachement be type ItemCollection? Or I miss something?
Activitypub Vocabulary Example 66
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"name": "Have you seen my cat?",
"attachment": [
{
"type": "Image",
"content": "This is what he looks like.",
"url": "http://example.org/cat.jpeg"
}
]
}
Ex. object.go
type Object struct {
/* .... */
// Attachment identifies a resource attached or related to an object that potentially requires special handling.
// The intent is to provide a model that is at least semantically similar to attachments in email.
Attachment Item `jsonld:"attachment,omitempty"`
/* .... */
}
Ex. actor.go
type Actor struct {
/* .... */
// Attachment identifies a resource attached or related to an object that potentially requires special handling.
// The intent is to provide a model that is at least semantically similar to attachments in email.
Attachment Item `jsonld:"attachment,omitempty"`
/* .... */
}
Currently, the property
Attachement
inObject
struct and some other struct has typeItem
. Since from the Activitypub Vocabulary Spec (Example 66) shown thatattachment
field can be JSON array, so shouldn'tAttachement
be typeItemCollection
? Or I miss something?Activitypub Vocabulary Example 66
Ex. object.go
Ex. actor.go