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

Improper unmarshalling #232

Closed
Erog38 opened this issue Jul 9, 2020 · 3 comments · Fixed by #328
Closed

Improper unmarshalling #232

Erog38 opened this issue Jul 9, 2020 · 3 comments · Fixed by #328
Milestone

Comments

@Erog38
Copy link

Erog38 commented Jul 9, 2020

// ResponderRequestTarget specifies an individual target for the responder request.

Use of this field doesn't unmarshal properly and causes the sdk to not allow adding responders to an event.

https://play.golang.org/p/uDs91_9GXDG

@Erog38
Copy link
Author

Erog38 commented Jul 9, 2020

In fact, I think just adding an s to this line would fix it.

Targets []ResponderRequestTarget `json:"responder_request_targets"`

So it should be

Targets     []ResponderRequestTargets `json:"responder_request_targets"`

and not

Targets     []ResponderRequestTarget `json:"responder_request_targets"`

@stmcallister
Copy link
Contributor

Thanks for pointing this out! Would you mind submitting a PR for the fix?

@Erog38
Copy link
Author

Erog38 commented Jul 16, 2020

Sure thing @stmcallister ! I opened #233 for review to fix this and a couple other spots. I wasn't sure you watched this repo, I assumed most of this code was generated from the openapi spec or similar.

@theckman theckman added this to the v1.5.0 milestone Mar 25, 2021
Erog38 added a commit to Erog38/go-pagerduty that referenced this issue Apr 5, 2021
adding array definition to ResponderRequest

vet your code kids.
@theckman theckman linked a pull request May 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants