Fix some mismatches between REST API and struct definitions #396
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 toomitempty
, which means we were rendering them in the JSON even when not set.This also reorders the
ChangeEventPayload
so that theSummary
field is atthe top, since it's the only required field.
In
escalation_policy.go
, theEscalationPolicy
type looked to have a field onit 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