-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotation to handle sanitization of field names in open types #1269
Comments
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.
The text was updated successfully, but these errors were encountered: