OLINGO-915: Support system options with FunctionImports based the return types rather than restricting only to composable functions
This commit is contained in:
parent
300316db8d
commit
1a41ae8d30
|
@ -255,9 +255,6 @@ public class UriValidator {
|
|||
|
||||
private UriType getUriTypeForFunction(final UriResource lastPathSegment) throws UriValidationException {
|
||||
final UriResourceFunction uriFunction = (UriResourceFunction) lastPathSegment;
|
||||
if (!uriFunction.getFunction().isComposable()) {
|
||||
return UriType.none;
|
||||
}
|
||||
|
||||
final boolean isCollection = uriFunction.isCollection();
|
||||
final EdmTypeKind typeKind = uriFunction.getFunction().getReturnType().getType().getKind();
|
||||
|
|
|
@ -1236,27 +1236,14 @@ public class TestFullResourcePath {
|
|||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')(0)/PropertyInt16")
|
||||
.isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$top=1")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')",
|
||||
"$filter=PropertyInt16 eq 1")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$count=true")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skiptoken=5")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
|
||||
testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$search=test")
|
||||
.isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED);
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$top=1");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')",
|
||||
"$filter=PropertyInt16 eq 1");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$count=true");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skiptoken=5");
|
||||
testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$search=test");
|
||||
|
||||
testUri.run("ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim()")
|
||||
.isKind(UriInfoKind.resource)
|
||||
|
|
Loading…
Reference in New Issue