applied json-ld & properties

Hello,

Since people have been tolerant of my trivial questions so far, I thought I
would try another.

I am not certain this necessarily a json-ld question...and if not, I will
go elsewhere for help.

I have been using schema.org as a good(?) example of how to define a
vocabulary as I think about my own.

Let's say that I have a property that is required to be a value between 0
and 100 because it expressed a percentage of a total. How might I express
this in my dictionary? I see that schema.org defines
https://schema.org/QuantitativeValue which has minValue and maxValue
properties, but I don't see an example. If I were to guess, I would guess
that I would subclass from QuantitativeValue and then define my term where
the maxValue and minValue are fixed numbers.

My second (and somewhat related) question is how to handle the notion of a
"required" property. I see https://schema.org/domainIncludes which allows
one to define on which terms a property is used. Imagine I would need to
extend the definition of domainIncludes a bit to have a property called
"required" which would be either true or false and have an implied default
of false.

Does any of this sound right?

Regards,
James

Received on Monday, 9 March 2020 20:16:48 UTC