Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating non-standard properties on existing vocabulary + creating non-standard vocabulary #149

Closed
gabek opened this issue Jul 25, 2021 · 2 comments

Comments

@gabek
Copy link

gabek commented Jul 25, 2021

I'm looking to accomplish two things, but the answer is probably similar enough I'm throwing them into one question :)

  1. Add non-standard properties to an existing type (example: isLiveBroadcast on a Video)
  2. Add a custom type (example: Hashtag type as used in Mastodon)

I think the official way of doing this is creating a new definition and running codegen against it, but I just wanted to make sure that's the only option, and there isn't something I'm missing of how to set a map of properties to a type, or extend a type without forking and re-generating.

Thanks for everything!

@cjslep
Copy link
Member

cjslep commented Jul 26, 2021

Hey!

Yep, that is the "official" way. Here is an example JSONLD file for creating new types and properties. The "domain" is where the property is valid (pick the highest level type that makes sense), and the "range" are the possible value types for that property. For the isLiveBroadcast the boolean is represented as xsd:boolean.

As for the Hashtag type originally defined by Mastodon, that's handled in this issue. I'm not sure if it is well-defined-enough to go ahead and submit a PR for, or if there's a couple questions that need to be posed to the Mastodon folks to get an agreement.

Let me know if I don't make sense.

@gabek
Copy link
Author

gabek commented Jul 28, 2021

Got it! Thanks for pointing me in the right direction. I'll let you know if I run into any issues with tweaking and generating!

@gabek gabek closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants