Closed RReverser closed 1 week ago
Thanks Ingvar, I'm going to accept this PR and will retain your structural changes from anyOf to oneOf etc.
I chose the original "Platform 7 onward" style in order to make the change stand out, so will likely revert to this visual style since it doesn't impact use of the YAML file. I may also update the descriptions, for example, "variadic" is not a term with which most people will be familiar.
Thanks, Peter
I chose the original "Platform 7 onward" style in order to make the change stand out, so will likely revert to this visual style since it doesn't impact use of the YAML file.
Yeah it's mostly a semantic difference - that syntax is intended for pieces of code, not actual human text. But fair enough, it doesn't really impact me.
for example, "variadic" is not a term with which most people will be familiar
Hm I see you changed it to "object", but I think that's also going to be pretty confusing to people coming from languages that don't have "everything is an object / is castable to an object" paradigm that C# has. In many languages, "object" has a strict meaning and is synonymous with "struct" or "class".
I'd probably change it to "This is a dynamically-typed variable" or even just "This is a variable..." since you go on to list all the types it can hold in the same sentence.
Name
property is common to anyDeviceState
variant, so instead of making the object itself a collection of variants, I extracted the commonName
property and made onlyValue
variadic.Value
has been changed to match ASCOM definition closer - there is no need to list integer/float or string/datetime separately, as they're represented in the same way in JSON, and interpreting theValue
requires custom handling depending on propertyName
anyway.anyOf
, useoneOf
like in other definitions. In this case they'll behave in the same way, but generallyanyOf
has different semantics - "match 1 or more of the following types at the same time" instead of "match 1 of the following types exclusively".