Skip to content

Commit

Permalink
Merge branch 'release/2020-07-rc2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed Jul 29, 2020
2 parents 8b41505 + f17bed1 commit a4d3241
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/controllers/ElementController.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public class ElementController extends Controller {
@Inject
private Environment environment;

private static final boolean INLINE_JSON_LD_CONTEXT_DEFAULT = true;
private static final boolean INLINE_JSON_LD_CONTEXT = Optional.ofNullable(System.getenv("INLINE_JSON_LD_CONTEXT"))
.map(Boolean::parseBoolean).orElse(INLINE_JSON_LD_CONTEXT_DEFAULT);

public Result byId(String id) {
UUID uuid = UUID.fromString(id);
Optional<Element> element = elementService.getById(uuid);
Expand Down Expand Up @@ -95,7 +99,7 @@ static JsonLdMofObjectAdornment adornMofObject(MofObject mof, Http.Request reque
return new JsonLdMofObjectAdornment(mof, metamodelProvider, environment,
String.format("http://%s", request.host()),
String.format("/projects/%s/commits/%s/elements/", projectId, commitId),
false
INLINE_JSON_LD_CONTEXT
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/jackson/JsonLdMofObjectAdornment.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public JsonLdMofObjectAdornment(MofObject mof, MetamodelProvider metamodelProvid
if (!(cachedContext instanceof ObjectNode)) {
throw new IllegalStateException("context expected to be an ObjectNode");
}
contextObjectNode.setAll((ObjectNode) cachedContext);
contextObjectNode.setAll((ObjectNode) cachedContext.get("@context"));
}
else {
contextObjectNode.put("@import", URI.create(host).resolve(String.format("/jsonld/%s.jsonld", type)).toString());
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name := """SysML-v2-API-Services"""
organization := "org.omg"

version := "2020-07-rc1"
version := "2020-07-rc2"

javacOptions ++= Seq("-source", "11", "-target", "11", "-Xlint")

Expand Down

0 comments on commit a4d3241

Please sign in to comment.