Closed pelikhan closed 3 years ago
Yes, issue #86 captures a general shortcoming in the documentation: there's not enough documentation about the JSON-LD aspects of DTDL. Right now, the documentation assumes the reader knows how JSON-LD syntax comes through in DTDL (but that's not a great assumption and something we want to fix).
In the meantime, yes, extends can be a single value or multiple values. In DTDL v2, the limit to the number of interfaces that can be extended is 2.
These forms are all valid:
"extends": "dtmi:com:example:Base;1"
"extends": [ "dtmi:com:example:Base;1" ]
"extends": [ "dtmi:com:example:Base;1", "dtmi:com:example:AnotherInterface;1" ]
The documentation of extends is sparse. It specifies that it is a set; but the only example uses a single string. Is it a
string | string[]
type?