mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-07 21:38:15 +00:00
missed code
This commit is contained in:
parent
ef86cf7652
commit
f23f9204b8
@ -296,7 +296,7 @@ public class BaseWorkerContextTests {
|
||||
public void testAddServerValidationParametersDisplayWarning() throws IOException {
|
||||
BaseWorkerContext baseWorkerContext = getBaseWorkerContext();
|
||||
Parameters pin = new Parameters();
|
||||
baseWorkerContext.addServerValidationParameters(baseWorkerContext.getTxClientManager().getMaster(), new ValueSet(), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())).setDisplayWarningMode(true));
|
||||
baseWorkerContext.addServerValidationParameters(null, baseWorkerContext.getTxClientManager().getMaster(), new ValueSet(), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())).setDisplayWarningMode(true));
|
||||
assertEquals("lenient-display-validation", pin.getParameter("mode").getValue().primitiveValue());
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ public class BaseWorkerContextTests {
|
||||
public void testAddServerValidationParametersVsAsUrl() throws IOException {
|
||||
BaseWorkerContext baseWorkerContext = getBaseWorkerContext();
|
||||
Parameters pin = new Parameters();
|
||||
baseWorkerContext.addServerValidationParameters(baseWorkerContext.getTxClientManager().getMaster(), new ValueSet().setUrl("http://dummy.org/vs"), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())).setVsAsUrl(true));
|
||||
baseWorkerContext.addServerValidationParameters(null, baseWorkerContext.getTxClientManager().getMaster(), new ValueSet().setUrl("http://dummy.org/vs"), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())).setVsAsUrl(true));
|
||||
assertEquals("uri", pin.getParameter("url").getValue().fhirType());
|
||||
assertEquals("http://dummy.org/vs", pin.getParameter("url").getValue().primitiveValue());
|
||||
}
|
||||
@ -314,7 +314,7 @@ public class BaseWorkerContextTests {
|
||||
BaseWorkerContext baseWorkerContext = getBaseWorkerContext();
|
||||
|
||||
Parameters pin = new Parameters();
|
||||
baseWorkerContext.addServerValidationParameters(baseWorkerContext.getTxClientManager().getMaster(), new ValueSet(), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())));
|
||||
baseWorkerContext.addServerValidationParameters(null, baseWorkerContext.getTxClientManager().getMaster(), new ValueSet(), pin, new ValidationOptions(FhirPublication.fromCode(baseWorkerContext.getVersion())));
|
||||
assertNull(pin.getParameter("mode"));
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ public class BaseWorkerContextTests {
|
||||
Mockito.doReturn(cacheToken).when(terminologyCache).generateExpandToken(argThat(new ValueSetMatcher(vs)),eq(true));
|
||||
Mockito.doReturn(expectedExpansionResult).when(terminologyCache).getExpansion(cacheToken);
|
||||
|
||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true, false);
|
||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(null, inc, true, false);
|
||||
|
||||
assertEquals(expectedExpansionResult, actualExpansionResult);
|
||||
|
||||
@ -484,14 +484,14 @@ public class BaseWorkerContextTests {
|
||||
|
||||
TerminologyClientContext terminologyClientContext = context.getTxClientManager().getMaster();
|
||||
|
||||
Mockito.doReturn(expParameters).when(context).constructParameters(argThat(new TerminologyClientContextMatcher(terminologyClientContext)),argThat(new ValueSetMatcher(vs)), eq(true));
|
||||
Mockito.doReturn(expParameters).when(context).constructParameters(argThat(null), argThat(new TerminologyClientContextMatcher(terminologyClientContext)),argThat(new ValueSetMatcher(vs)), eq(true));
|
||||
|
||||
ValueSet expectedValueSet = new ValueSet();
|
||||
|
||||
Mockito.doReturn(expectedValueSet).when(terminologyClient).expandValueset(argThat(new ValueSetMatcher(vs)),
|
||||
argThat(new ParametersMatcher(pInWithDependentResources)));
|
||||
|
||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(inc, true, false);
|
||||
ValueSetExpansionOutcome actualExpansionResult = context.expandVS(null, inc, true, false);
|
||||
|
||||
assertEquals(expectedValueSet, actualExpansionResult.getValueset());
|
||||
|
||||
|
@ -190,7 +190,7 @@ ED_CONTEXT_INVARIANT_EXPRESSION_ERROR = Error in constraint ''{0}'': {1}
|
||||
ED_INVARIANT_DIFF_NO_SOURCE = The invariant {0} defined in the differential must have no source, or the source must be the same as the profile
|
||||
ED_INVARIANT_EXPRESSION_CONFLICT = The constraint ''{0}'' has an expression ''{1}'', which differs from the earlier expression provided of ''{2}'' (invariants are allowed to repeat, but cannot differ)
|
||||
ED_INVARIANT_EXPRESSION_ERROR = Error in constraint ''{0}'' with expression ''{1}'': {2}
|
||||
ED_INVARIANT_KEY_ALREADY_USED = The constraint key ''{0}'' already exists in the base profile ''{1}''
|
||||
ED_INVARIANT_KEY_ALREADY_USED = The constraint key ''{0}'' already exists at the location ''{1}'' with a different expression (''{2}'')
|
||||
ED_INVARIANT_NO_EXPRESSION = The constraint ''{0}'' has no computable expression, so validators will not be able to check it
|
||||
ED_INVARIANT_NO_KEY = The constraint has no key, so the content cannot be validated
|
||||
ED_PATH_WRONG_TYPE_MATCH = The path must be ''{0}'' not ''{1}'' when the type list is not constrained
|
||||
@ -1075,8 +1075,8 @@ XHTML_URL_DATA_MIMETYPE = The mimetype portion of the data: URL is not valid ({1
|
||||
XHTML_URL_DATA_NO_DATA = No data found in data: URL
|
||||
XHTML_URL_EMPTY = URL is empty
|
||||
XHTML_URL_INVALID = The URL is not valid because ''({1})'': {0}
|
||||
XHTML_URL_INVALID_CHARS_one = URL contains Invalid Character ({1})
|
||||
XHTML_URL_INVALID_CHARS_other = URL contains {0} Invalid Characters ({1})
|
||||
XHTML_URL_INVALID_CHARS_one = URL contains Invalid Character: {1}
|
||||
XHTML_URL_INVALID_CHARS_other = URL contains {0} Invalid Characters: {1}
|
||||
XHTML_XHTML_Attribute_Illegal = Invalid attribute name in the XHTML (''{0}'' on ''{1}'')
|
||||
XHTML_XHTML_DOCTYPE_ILLEGAL = Malformed XHTML: Found a DocType declaration, and these are not allowed (XXE security vulnerability protection)
|
||||
XHTML_XHTML_ELEMENT_ILLEGAL_IN_PARA = Invalid element name inside a paragraph in the XHTML (''{0}'')
|
||||
|
@ -5,6 +5,7 @@ import java.util.Set;
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.validation.instance.utils.Base64Util;
|
||||
|
||||
@ -50,7 +51,11 @@ public class UrlUtil {
|
||||
if (invalidChars.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return context.formatMessagePlural(c, I18nConstants.XHTML_URL_INVALID_CHARS, invalidChars.toString());
|
||||
Set<String> ss = new HashSet<>();
|
||||
for (Character ch : invalidChars) {
|
||||
ss.add("'"+ch.toString()+"'");
|
||||
}
|
||||
return context.formatMessagePlural(c, I18nConstants.XHTML_URL_INVALID_CHARS, CommaSeparatedStringBuilder.join(",", Utilities.sorted(ss)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,3 +13,115 @@ e: {
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"hierarchical" : false, "valueSet" :{
|
||||
"resourceType" : "ValueSet",
|
||||
"compose" : {
|
||||
"inactive" : true,
|
||||
"include" : [{
|
||||
"system" : "urn:ietf:bcp:13"
|
||||
}]
|
||||
}
|
||||
}}####
|
||||
e: {
|
||||
"from-server" : true,
|
||||
"error" : "Error from http://tx-dev.fhir.org/r4: The code System \"urn:ietf:bcp:13\" has a grammar, and cannot be enumerated directly"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
|
2
pom.xml
2
pom.xml
@ -23,7 +23,7 @@
|
||||
<commons_io_version>2.17.0</commons_io_version>
|
||||
<guava_version>32.0.1-jre</guava_version>
|
||||
<hapi_fhir_version>6.4.1</hapi_fhir_version>
|
||||
<validator_test_case_version>1.7.1</validator_test_case_version>
|
||||
<validator_test_case_version>1.7.2-SNAPSHOT</validator_test_case_version>
|
||||
<jackson_version>2.17.0</jackson_version>
|
||||
<junit_jupiter_version>5.9.2</junit_jupiter_version>
|
||||
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||
|
Loading…
x
Reference in New Issue
Block a user