warriordog / ActivityPubSharp

Modular implementation of ActivityPub in C#
https://warriordog.github.io/ActivityPubSharp/
Mozilla Public License 2.0
45 stars 9 forks source link

Support anonymous extensions #132

Closed warriordog closed 9 months ago

warriordog commented 9 months ago

Some real-world AP implementations don't properly indicate the extensions in use. Neither the type nor @context properties will accurately describe all properties. To support this, we should introduce the concept of an "anonymous extension". Anonymous extensions will not be converted automatically, and it will be up to application or extension code to recognize a valid object.

Once they do, however, conversion will work just as easily. Calling .As<> or similar should invoke some kind of TryExtendGraph or similar static method that validates the object shape and then constructs the new entity / object.