fix missing error validation structure maps
This commit is contained in:
parent
3bb5e8d06d
commit
4b07f4f7dc
|
@ -821,6 +821,7 @@ public class I18nConstants {
|
|||
public static final String SM_TARGET_TRANSFORM_EXPRESSION_ERROR = "SM_TARGET_TRANSFORM_EXPRESSION_ERROR";
|
||||
public static final String SM_IMPORT_NOT_FOUND = "SM_IMPORT_NOT_FOUND";
|
||||
public static final String SM_TARGET_TYPE_MULTIPLE_POSSIBLE = "SM_TARGET_TYPE_MULTIPLE_POSSIBLE";
|
||||
public static final String SM_DEPENDENT_PARAM_NOT_FOUND = "SM_DEPENDENT_PARAM_NOT_FOUND";
|
||||
public static final String SM_DEPENDENT_PARAM_MODE_MISMATCH = "SM_DEPENDENT_PARAM_MODE_MISMATCH";
|
||||
public static final String SM_DEPENDENT_PARAM_TYPE_MISMATCH = "SM_DEPENDENT_PARAM_TYPE_MISMATCH";
|
||||
public static final String SM_ORPHAN_GROUP = "SM_ORPHAN_GROUP";
|
||||
|
|
|
@ -876,6 +876,7 @@ SM_TARGET_TRANSFORM_EXPRESSION_ERROR = The FHIRPath expression passed as the eva
|
|||
SM_IMPORT_NOT_FOUND = No maps were found to match {0} - validation may be wrong
|
||||
SM_TARGET_TYPE_MULTIPLE_POSSIBLE = Multiple types are possible here ({0}) so further type checking is not possible
|
||||
SM_DEPENDENT_PARAM_MODE_MISMATCH = The parameter {0} refers to the variable {1} but it''s mode is {2} which is not the same as the mode required for the group {3}
|
||||
SM_DEPENDENT_PARAM_NOT_FOUND = The parameter {0} mode {1} was not found
|
||||
SM_DEPENDENT_PARAM_TYPE_MISMATCH = The parameter ''{0}'' refers to the variable ''{1}'' but it''s type is ''{2}'' which is not compatible with the type required for the group ''{3}'', which is ''{4}'' (from map ''{5}'')
|
||||
SM_ORPHAN_GROUP = The group {0} is not called from within this mapping script, and does not have types on it''s inputs, so type verification is not possible
|
||||
SM_SOURCE_TYPE_NOT_FOUND = No source type was found, so the default group for this implied dependent rule could not be determined
|
||||
|
|
|
@ -1143,7 +1143,7 @@ public class StructureMapValidator extends BaseValidator {
|
|||
String iType = resolveType(grp, input, src);
|
||||
String pname = input.getName();
|
||||
VariableDefn v = getParameter(errors, param, pstack, variables, input.getMode());
|
||||
if (v != null) {
|
||||
if (rule(errors, "2023-06-27", IssueType.INVALID, param.line(), param.col(), pstack.getLiteralPath(), v != null, I18nConstants.SM_DEPENDENT_PARAM_NOT_FOUND, pname, input.getMode().toCode())) {
|
||||
if (rule(errors, "2023-03-01", IssueType.INVALID, param.line(), param.col(), pstack.getLiteralPath(), v.mode.equals(input.getMode().toCode()), I18nConstants.SM_DEPENDENT_PARAM_MODE_MISMATCH, param.getChildValue("name"), v.mode, input.getMode().toCode(), grp.getTargetGroup().getName()) &&
|
||||
rule(errors, "2023-03-01", IssueType.INVALID, param.line(), param.col(), pstack.getLiteralPath(), typesMatch(v, iType), I18nConstants.SM_DEPENDENT_PARAM_TYPE_MISMATCH,
|
||||
pname, v.summary(), input.getType(), grp.getTargetGroup().getName(), input.getType(), grp.getTargetMap() == null ? "$this" : grp.getTargetMap().getVersionedUrl())) {
|
||||
|
|
Loading…
Reference in New Issue