-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some mismatches between REST API and struct definitions
This change includes the first few fixes while reviewing the repo for #389, and does include one breaking change. In `change_events.go`, there were a few optional fields that were not set to `omitempty`, which means we were rendering them in the JSON even when not set. This also reorders the `ChangeEventPayload` so that the `Summary` field is at the top, since it's the only required field. In `escalation_policy.go`, the `EscalationPolicy` type looked to have a field on it that indicated if repeating the notification rules was enabled. However, this field is not documented and when looking at the actual API response no such field was present. Instead, the field to indicate the number of loops is set to `0` when there is no repeating of the rules. The removal of this field is the breaking change, although hopefully nobody was using it. :) Updates #389
- Loading branch information
Showing
3 changed files
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters