Azure / opendigitaltwins-dtdl

Digital Twins Definition Language
Creative Commons Attribution 4.0 International
466 stars 160 forks source link

"extends" is under specified #104

Closed pelikhan closed 3 years ago

pelikhan commented 3 years ago

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?

briancr-ms commented 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: