Skip to content

Commit

Permalink
Fix frame expansion flag propagation (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
filip26 committed Jun 2, 2021
1 parent 8571228 commit cdf74ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public JsonValue compute() throws JsonLdError {

return ArrayExpansion
.with(activeContext, element.asJsonArray(), activeProperty, baseUrl)
.frameExpansion(frameExpansion)
.expand();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void expand() throws JsonLdError {
|| value.asJsonArray().stream().anyMatch(JsonUtils::isNotString)
)
) {
throw new JsonLdError(JsonLdErrorCode.INVALID_KEYWORD_ID_VALUE);
throw new JsonLdError(JsonLdErrorCode.INVALID_KEYWORD_ID_VALUE, "An @id entry was encountered whose value [" + value + "] was not a string.");

// 13.4.3.2
} else if (JsonUtils.isString(value)) {
Expand Down
12 changes: 9 additions & 3 deletions src/test/resources/com/apicatalog/jsonld/test/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@
"name": "ToRDF: document relative subject",
"input": "issue145-in.json",
"expect": "issue145-out.nq"
}


},
{
"@id": "#t0012",
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
"name": "Frame: @container: @id",
"input": "issue172-in.json",
"expect": "issue172-out.json",
"frame": "issue172-frame.json"
}
]
}

0 comments on commit cdf74ed

Please sign in to comment.