-
Notifications
You must be signed in to change notification settings - Fork 242
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
Fix misspelling in User struct and add JSON tags #34
Conversation
The original error I got from the API without the modified struct.
https://github.com/heimweh/terraform-provider-pagerduty |
Role string | ||
AvatarURL string `json:"avatar_url"` | ||
Description string | ||
ID string `json:"id"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heimweh ID comes from APIObject struct, which we are embedding here. You can omit this attribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed that completely. I'll omit that attribute :) Thanks!
@heimweh looks good to me. Just remove the ID field. |
@ranjib thanks for the response, I'll have a look at getting this fixed asap. |
@ranjib should be fixed now |
thank you :-) |
* adding event_rules endpoint and user-agent header * removing options from event_rule * removing options from event_rule * adding ruleset and ruleset_test * cleaning up rulesets a bit
Hi,
I'm using this library in a Terraform provider and noticed that I can't really create a user with the current
User
struct.I modified the
User
struct like this to get it to work.Please note that I'm very new to Go and my code might have faults in it,
but at least I got it to work with this change.