Open marcus905 opened 2 months ago
Can you create a class implementing the 'IDictionary<string, object>' interface and add the verification codes within the interface method?
I probably can, but I shouldn't have to. It's a specification of a format and in my opinion it's expected for the library to have a facility to do that in open types where there is no other way to do that (besides your option probably, but that means reinventing a lot of the whole wheel). Having the option in the library instead would be way easier to implement, probably just a few lines of code.
If you want, I can try to provide a pull request. Tell me if you'd accept it, though, else it'd be wasted work.
My solve has been a view in the source DB to fix this, currently.
@marcus905 We love to see your contribution.
Assemblies affected ASP.NET Core OData 8.x
Describe the bug There is no way to handle special characters if present in dynamic properties in OData, causing:
"The property name '01.01' is invalid; property names must not contain any of the reserved characters ':', '.', '@'."
Reproduce steps in an IDictionary<string, object>, if the key contains a special character, on read it throws this error
Data Model
EDM (CSDL) Model
Request/Response N/A
Expected behavior There needs to be, for the open type annotation, a way to specify that non-compliant field names must be sanitized before sending them out.