Help Wanted: User props is not fully described in API reference
Everywhere in the API reference User Props is described as object. For instance https://api.mattermost.com/#operation/CreateUser .
Regarding to https://www.json.org/json-en.html JSON object can have members of any JSON types.
But in official drivers the field props has type map[string]string
https://github.com/mattermost/mattermost-server/blob/d1eeafb29ff822cf6d9850a5307ab37c61fbc445/model/user.go#L85
https://github.com/mattermost/mattermost-redux/blob/3d1028034d7677adfda58e91b9a5dcaf1bc0ff99/src/types/users.ts#L42
Proposal: In the API reference clearly specify that User Props can have members only of string type
@mkraft - Would a member of your team be able to assist with this issue?
@vblz The word "object" is actually correct in this case in that the required type is an object, an object that happens to have other constraints. Also the constraints are detailed within the API documentation.
.
@mkraft I didn't mean whole object to pass, but only props field.
According to the code I linked above you can not pass such a valid JSON object there
...
"props": {"a": 1, "b":["list", "example"]}
...
but there is no mention about this limitation in api documentation and only way to find it out is checking source code.
@vblz Ah yes good point, props isn't well documented like notify_props is. Is this something you would be interested in submitting a pull request for? If not, no worries we can add it as a help wanted. Either way, thanks for identifying it.
@mkraft it's better to add "help wanted" tag
Copied the request to https://mattermost.atlassian.net/browse/MM-42462.
I would like to work on this. @mkraft @cwarnermm Can you assign this to me?