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 marshalling for vcs repo options #204

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Conversation

radditude
Copy link
Member

@radditude radditude commented Apr 12, 2021

Description

The jsonapi library doesn't marshal model attributes that are structs properly if they use the jsonapi attr struct tag, but only when marshalling requests; when unmarshalling the response, attr tags work just fine. In other words, WorkspacePermissions are working fine since they're included in the response, but aren't something that's set in the request; VCSRepoOptions are options for the request itself, so they're not working.

Testing plan

  1. Using a nested struct in create or update options marshalls to real JSON.

External links

#202

The jsonapi library doesn't marshal model attributes
that are structs properly if they use the jsonapi attr
struct tag; let's use regular json struct tags for nested
attributes
@radditude radditude marked this pull request as ready for review April 12, 2021 18:19
@radditude radditude requested a review from a team April 12, 2021 18:19
Copy link
Contributor

@omarismail omarismail left a comment

Choose a reason for hiding this comment

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

🚢

@radditude radditude merged commit fdcbf1a into master Apr 12, 2021
@radditude radditude deleted the radditude/fix-tests branch April 12, 2021 18:23
@radditude radditude changed the title fix marshalling nested structs in requests fix marshalling for vcs repo options Apr 12, 2021
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.

2 participants