So I've been working on a #golang tool that will take in a JSON-LD RDF specification (like the #ActivityStreams one here :https://github.com/gobengo/activitystreams2-spec-scraped/blob/master/data/activitystreams-vocabulary/1528589057.json) and spit out generated Go code that automatically generates the static types for it.
The intent is, ActivityStreams extensions would be able to host this specification as their @context reference, people could use this tool to auto-generate the extension for their Go code, and then build their apps with it.
The biggest problem I am facing right now is that I am having to code into the tool the different RDF specifications:
- OWL2
- RDF
- RDFS
- Schema.org
- XSD
So where things will get hairy is: I am lazy and don't want to implement all of them. :)
So "if" (I hope) or "when" ('cause life) a new vocabulary wants to use some esoteric RDF specification to do so, or parts of the above I haven't implemented yet, the tool will fail and the tool will need an update. Which stinks.
But at the end of the day, I want it to get to the point where if the Go code compiles, the app is guaranteed conforming to the vocabulary and extensions specification (the "data" part of #ActivityPub).
Then if the app happens to use the rest of the go-fed part for the actual AP behaviors, it comes with my Guarantee Seal of Approval (valued at one bagoozillitillion USD) that the "behavior" part is also to-spec. Unfortunately, a lot of that is run-time correctness.