HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
114 stars 53 forks source link

Boolean fields are not deserialized into SlackUser model #181

Open omotnyk opened 4 years ago

omotnyk commented 4 years ago

Describe the bug We noticed that Optional<Boolean> values are not deserialized correctly into SlackUser. For example, Slack sends user with key is_bot but we expect bot due to the Jackson deserialization logic which works like that for isBot methods. We need to add get prefix to those methods to fix deserialization or specify key via @JsonProperty. The second option seems better as there are already some usages of the methods.

180

To Reproduce Steps to reproduce the behavior:

  1. Try to deserialize SlackUser.
  2. See that no fields with isXxx getter are deserialized.

Expected behavior All the fields with isXxx getter are deserialized correctly.