Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating an incident, consumers shouldn't need to set the Type field #390

Closed
theckman opened this issue Nov 14, 2021 · 0 comments · Fixed by #392
Closed

When creating an incident, consumers shouldn't need to set the Type field #390

theckman opened this issue Nov 14, 2021 · 0 comments · Fixed by #392
Milestone

Comments

@theckman
Copy link
Collaborator

The type can only be incident, and so it should be set by default within the package and not exposed a consumer-settable option.

Type string `json:"type"`

Since we can't remove it without it being a breaking change, we should deprecate it in preparation for v2.0.0.

@theckman theckman added this to the v1.5.0 milestone Nov 14, 2021
theckman added a commit that referenced this issue Nov 14, 2021
We should not expect consumers to set this value, as there is only a single
value that is valid (`incident`) based on how we use the API. As such, let's
deprecate the field and just set it in the methods that need it.

This also updates the tests to assert that we're automatically setting it
appropriately.

Closes #390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant