From 62553875d7ff1e34e62bf038b156e693dc9d5725 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 22 Jul 2020 12:55:21 +1000 Subject: [PATCH] fix package id in generated version specific tests --- .../hl7/fhir/convertors/misc/NpmPackageVersionConverter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/NpmPackageVersionConverter.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/NpmPackageVersionConverter.java index 5e57cf4da..103d8b680 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/NpmPackageVersionConverter.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/NpmPackageVersionConverter.java @@ -36,6 +36,7 @@ import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.VersionUtilities; import org.hl7.fhir.utilities.cache.NpmPackageIndexBuilder; import org.hl7.fhir.utilities.cache.NpmPackage.NpmPackageFolder; +import org.hl7.fhir.utilities.json.JSONUtil; import org.hl7.fhir.utilities.json.JsonTrackingParser; import com.google.common.base.Charsets; @@ -217,6 +218,9 @@ public class NpmPackageVersionConverter { private byte[] convertPackage(byte[] cnt) throws IOException { JsonObject json = JsonTrackingParser.parseJson(cnt); currentVersion = json.getAsJsonArray("fhirVersions").get(0).getAsString(); + String name = JSONUtil.str(json, "name"); + json.remove("name"); + json.addProperty("name", name+"."+vCode); json.remove("fhirVersions"); json.remove("dependencies"); JsonArray fv = new JsonArray();