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

Fix struct tag for varset relationship #521

Merged
merged 2 commits into from Sep 6, 2022
Merged

Conversation

sebasslash
Copy link
Contributor

This PR fixes #491, where the struct tag definition for the variable set relationship was incorrectly named thus resulting in a null value.

@sebasslash sebasslash requested a review from a team as a code owner August 30, 2022 21:17
@@ -49,7 +49,7 @@ type VariableSetVariable struct {
Sensitive bool `jsonapi:"attr,sensitive"`

// Relations
VariableSet *VariableSet `jsonapi:"relation,configurable"`
VariableSet *VariableSet `jsonapi:"relation,varset"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are varset.data.id and varset.data.type being exposed?

Screen Shot 2022-08-30 at 5 27 48 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! The relationship is automatically included in the response body.

Copy link
Contributor

@annawinkler annawinkler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@sebasslash sebasslash merged commit fba8069 into main Sep 6, 2022
@sebasslash sebasslash deleted the null-varset-relationship branch September 6, 2022 21:16
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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 this pull request may close these issues.

VariableSetVariable struct has null value for VariableSet
3 participants