Code generation

This commit is contained in:
Grahame Grieve 2024-10-22 05:16:54 +10:30
parent d6c3a9df0b
commit 9dc08c213c

View File

@ -870,10 +870,21 @@ public class ValidationService {
}
for (String profile : cliContext.getProfiles()) {
gen.setCanonical(profile);
System.out.print("Generate for "+profile);
String s = gen.execute();
System.out.println(": "+s);
if (profile.endsWith("*")) {
for (StructureDefinition sd : validationEngine.getContext().fetchResourcesByType(StructureDefinition.class)) {
if (sd.getUrl().startsWith(profile.replace("*", ""))) {
gen.setCanonical(sd.getUrl());
System.out.print("Generate for "+sd.getUrl());
String s = gen.execute();
System.out.println(": "+s);
}
}
} else {
gen.setCanonical(profile);
System.out.print("Generate for "+profile);
String s = gen.execute();
System.out.println(": "+s);
}
}
System.out.println("Done");
}