change error to warning validating maps

This commit is contained in:
Grahame Grieve 2023-09-29 13:38:05 +10:00
parent ed07d18506
commit 6fa4bb1061
3 changed files with 26 additions and 5 deletions

View File

@ -394,10 +394,10 @@ Does_not_match_slice_ = Does not match slice ''{0}'' (discriminator: {1})
Profile__does_not_match_for__because_of_the_following_profile_issues__ = Profile {0} does not match for {1} because of the following profile issues: {2}
This_element_does_not_match_any_known_slice_ = This element does not match any known slice {0}
defined_in_the_profile = Defined in the profile
This_does_not_appear_to_be_a_FHIR_resource_unknown_name_ = This does not appear to be a FHIR resource (unknown name ''{0}'')
This_cannot_be_parsed_as_a_FHIR_object_no_name = This cannot be parsed as a FHIR object (no name)
This_does_not_appear_to_be_a_FHIR_resource_unknown_namespacename_ = This does not appear to be a FHIR resource (unknown namespace/name ''{0}::{1}'')
This__cannot_be_parsed_as_a_FHIR_object_no_namespace = This ''{0}'' cannot be parsed as a FHIR object (no namespace)
This_does_not_appear_to_be_a_FHIR_resource_unknown_name_ = This content cannot be parsed (unknown or unrecognised XML root element name ''{0}'')
This_cannot_be_parsed_as_a_FHIR_object_no_name = This content cannot be parsed (no name)
This_does_not_appear_to_be_a_FHIR_resource_unknown_namespacename_ = This content cannot be parsed (unknown or unrecognised XML Root element namespace/name ''{0}::{1}'')
This__cannot_be_parsed_as_a_FHIR_object_no_namespace = This ''{0}'' cannot be parsed (no namespace on the XML Root element)
Unable_to_find_resourceType_property = Unable to find resourceType property
Error_parsing_JSON_the_primitive_value_must_be_a_string = Error parsing JSON: the primitive value must be a string
Error_parsing_JSON_the_primitive_value_must_be_a_number = Error parsing JSON: the primitive value must be a number

View File

@ -1169,7 +1169,7 @@ public class StructureMapValidator extends BaseValidator {
Element g = (Element) grp.getTargetGroup().getUserData("element.source");
if (g.hasUserData("structuremap.parameters")) {
VariableSet pvars = (VariableSet) g.getUserData("structuremap.parameters");
rule(errors, "2023-03-01", IssueType.INVALID, dependent.line(), dependent.col(), stack.getLiteralPath(), pvars.matches(lvars), I18nConstants.SM_DEPENDENT_PARAM_TYPE_MISMATCH_DUPLICATE, grp.getTargetGroup().getName(), pvars.summary(), lvars.summary());
warning(errors, "2023-03-01", IssueType.INVALID, dependent.line(), dependent.col(), stack.getLiteralPath(), pvars.matches(lvars), I18nConstants.SM_DEPENDENT_PARAM_TYPE_MISMATCH_DUPLICATE, grp.getTargetGroup().getName(), pvars.summary(), lvars.summary());
} else {
g.setUserData("structuremap.parameters", lvars);
}

View File

@ -163,6 +163,27 @@ v: {
"code" : "US",
"system" : "urn:iso:std:iso:3166",
"version" : "2018",
"issues" : {
"resourceType" : "OperationOutcome"
}
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:iso:std:iso:3166",
"code" : "FIN"
}, "valueSet" :null, "langs":"", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "displayWarningMode":"false", "versionFlexible":"true", "profile": {
"resourceType" : "Parameters",
"parameter" : [{
"name" : "profile-url",
"valueString" : "http://hl7.org/fhir/ExpansionProfile/dc8fd4bc-091a-424a-8a3b-6198ef146891"
}]
}}####
v: {
"display" : "Finland",
"code" : "FIN",
"system" : "urn:iso:std:iso:3166",
"version" : "2018",
"unknown-systems" : "",
"issues" : {
"resourceType" : "OperationOutcome"