Merge pull request #462 from hapifhir/add-fhirVersions-to-package-generator

Add a builder method for fhirVersions
This commit is contained in:
Tadgh 2021-03-17 17:03:07 -04:00 committed by GitHub
commit eb2ae84e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 3 deletions

View File

@ -35,6 +35,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.List;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
@ -109,20 +111,29 @@ public class PackageGenerator {
object.addProperty("version", value);
return this;
}
public PackageGenerator toolsVersion(int value) {
object.addProperty("tools-version", value);
return this;
}
public PackageGenerator fhirVersions(List<String> versions) {
JsonArray fhirVersionsArray = new JsonArray();
for (String version : versions) {
fhirVersionsArray.add(version);
}
object.add("fhirVersions", fhirVersionsArray);
return this;
}
public PackageGenerator description(String value) {
object.addProperty("description", value);
return this;
return this;
}
public PackageGenerator license(String value) {
object.addProperty("license", value);
return this;
return this;
}
public PackageGenerator homepage(String value) {