Open MuhammadMujtaba19 opened 4 years ago
@MuhammadMujtaba19 The library is currently written to be flexible enough to support custom query options with and without the $ sign which is currently not as per the protocol. In this case it would be a breaking change to raise the error from the Uriparser as there may be people who depend on this behavior. However the Northwind Sample Service does seem to have a bug which should throw an error for the un-used query options.
@marabooy So, should I consider this as designed ?
Currently the library works as designed but the sample has a bug which should be fixed,
I am using ODataURIParser to parse my Odata query sent from postman, I malformed a query by missing a equal to sign with the filter parameter. Surprisingly I didn't gave me the error I was expecting, instead it ignored that and returned me a output for that
Reproduce steps
Expected result
ODataURIParser should throw an error something like this
Note:- This is Odata's free Northwind service (https://services.odata.org/v4/Northwind/Northwind.svc)
Actual result
No error, Returns the output for https://localhost:9260/api/OData/Northwind/Customers and ignores the rest
Additional detail
this is not only problem with filter only, we can similarly send any malformed query, ODataURIParsers totally ignores them