Closed rossbuggins closed 2 years ago
In my humble opinion it is not up to OData to conform to consumers passing parameters in the wrong way. Implementing a stripping of quotes for a GUID parameter seems like a crude patch to me, whereas ideally it is the consumer that adjusts the code.
I agree ... this is essentially asking "please support bad client practice" ... that could be a deep rabbit hole the OData team may never come out of.
Actually I can see both points, BUT - this is the wrong place to ask for this change. It should be raised with the odata committee for a POSSIBLE change in the odata specs. That is the right palce for such a discussion, not here, which is merely implementing the functionality.
By design
Some BI platforms (PowerBI for one) don't support Guids as a data type so send them to Odata as a string enclosed in single quotes. These are then not picked up as valid as a route for the odata function as it is expecting guid data not enclosed in quotes. (this probably one for asp.net web core rather than here, but discussion would be useful).
When it trys to parse value to guid to test if the parameter value type matches for that parameter name, some option to strip out quotes and single quotes from the given parameter string from the url.
See related for discussing this on PowerBI custom connectors https://github.com/microsoft/DataConnectors/issues/258