Closed digimaun closed 1 year ago
The context rule in JSON-LD is that later contexts override earlier contexts. So, your second example is actually DTDL v2. It is not a combination of v3 and v2. If you try to use a v3 feature (such as Array in Property) in your second example, it will fail with an error.
Understood, thanks for explaining this JSON-LD rule.
Separate from the original issue, I also want to confirm that in DTDL v2, you are able to use unknown context specifiers where-as in v3 only known context specifiers are allowed right?
Here is example with v2 that is valid
Which fails with v3
Closing, will follow up on the additional question later.
Using the dtdlparser 1.0.48-preview, I noticed you are able to combine the v2 and v3 contexts at the same time. One thought around this, is by allowing mixed contexts it feels like it undermines at least one v3 extension which is quantitativeTypes v1.
Taking the first example off the quantitative types reference, removing the extension from @context causes an error as expected
However you can fix it by adding the v2 context, skipping usage of quantitative types altogether.