You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to send-narrowcast-message, max and upToRemainingQuota are optional. But Max field in Limit is defined Max int32 `json:"max". As a result, when Max is defined zero value, it isn't defined.
It may be needed to add omitempty. If this approach is acceptable, I would like to proceed with submitting a pull request. Please let me know if there are any concerns or suggestions for improvement.
type Limit struct {
Max int32 `json:"max,omitempty"`
UpToRemainingQuota bool `json:"upToRemainingQuota"`
}
Thank you for your report. We have confirmed the behavior on our end as well. The Limit.max should allow null (as it has a different meaning from int 0), so omitempty should be added. Otherwise, it is not possible to use the Limit object with the sdk-go because the API does not accept max=0 in the request.
We believe this behavior should be fixed. It would be greatly appreciated if you could create a PR for the fix. Thank you very much for your cooperation.
System Informations
Current Behavior
According to send-narrowcast-message,
max
andupToRemainingQuota
are optional. ButMax
field inLimit
is definedMax int32 `json:"max"
. As a result, whenMax
is defined zero value, it isn't defined.If
Limit
is defined like below.The result of
json.MarshalI
value is like this.Expected Behavior
It may be needed to add
omitempty
. If this approach is acceptable, I would like to proceed with submitting a pull request. Please let me know if there are any concerns or suggestions for improvement.The value expected is like this.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: