Description
{
Data = new PlayerDataInPostRequest
{
Id = null!, // FIXME: passing "" here works fine 🤔
}
}
Originally posted by @verdie-g in #1475 (comment)
Interesting! I've debugged it down to RuntimeTypeConverter
, which returns the target type's default value for an empty string. And there are tests for that behavior. However, I have no idea why it works like that. It was introduced in #139, all the way back in 2017.
When removing that behavior, all the tests are still green. However this is a very risky thing to change.
@maurei does this ring any bells? What's happening here is that a client sends "data": { "id": "", ... }
in a post resource request, with the configuration that client-generated IDs are required.
Originally posted by @bkoelman in #1475 (comment)
Read into it a little bit. It sounds familiar for sure, but it doesn't really ring a concrete bell at this moment... 🤷
Originally posted by @maurei in #1475 (comment)