Fix for validating extensions on R5 resources in R4 (R4 special case)
This commit is contained in:
parent
841de5657e
commit
0685bc7a81
|
@ -407,6 +407,17 @@ public class VersionUtilities {
|
|||
}
|
||||
|
||||
|
||||
/** same as getCanonicalResourceNames but add R5 supported types that are canonical too */
|
||||
public static Set<String> getExtendedCanonicalResourceNames(String version) {
|
||||
Set<String> res = getCanonicalResourceNames(version);
|
||||
if (isR4Ver(version)) {
|
||||
res.add("ActorDefinition");
|
||||
res.add("Requirements");
|
||||
res.add("SubscriptionTopic");
|
||||
res.add("TestPlan");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public static Set<String> getCanonicalResourceNames(String version) {
|
||||
|
||||
Set<String> res = new HashSet<String>();
|
||||
|
|
|
@ -2218,7 +2218,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
ok = true;
|
||||
} else if (en.equals("Resource") && container.isResource()) {
|
||||
ok = true;
|
||||
} else if (en.equals("CanonicalResource") && VersionUtilities.getCanonicalResourceNames(context.getVersion()).contains(stack.getLiteralPath())) {
|
||||
} else if (en.equals("CanonicalResource") && VersionUtilities.getExtendedCanonicalResourceNames(context.getVersion()).contains(stack.getLiteralPath())) {
|
||||
ok = true;
|
||||
} else if (hasElementName(plist, en) && pu == null) {
|
||||
ok = true;
|
||||
|
|
Loading…
Reference in New Issue