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

Add NullableRelationship support #226

Closed
Closed
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4965d30
Add ability to unmarshal slice of pointers
omarismail Apr 20, 2021
edf82c9
update go mod
omarismail Apr 20, 2021
7827d7a
Unmarshal Links type to 'links' annotated struct fields
chrisarcand May 11, 2021
4ff67af
Update request.go
chrisarcand May 18, 2021
1e50d74
Merge pull request #10 from hashicorp/add-links-unmarshaling
chrisarcand May 18, 2021
15d5181
Add unmarshaling of interface attribute (#11)
omarismail Aug 17, 2021
12ae986
Allow an extra field to be marshalled for relations
cam-stitt Aug 20, 2021
7401b01
Add allowattrs annotation for relations
cam-stitt Aug 24, 2021
27f7e4a
Add doc on toShallowNode
cam-stitt Aug 24, 2021
4018410
Remove redundant annotation
cam-stitt Aug 25, 2021
6ea81fe
Redundant test logic
cam-stitt Aug 26, 2021
df7b62a
Fix ID logic
cam-stitt Aug 26, 2021
45d18d4
add comment for spec compliance
thrashr888 Aug 26, 2021
ee7dae0
Merge pull request #12 from hashicorp/cs/allow-extra-field-relation
cam-stitt Aug 26, 2021
271d8a0
Add CI workflow for github actions
brandonc Oct 23, 2023
d4bec3a
Adjust go test versions
brandonc Oct 23, 2023
b6a3d21
Merge pull request #14 from hashicorp/TF-10301-setup-ci-for-jsonapi-repo
brandonc Oct 23, 2023
473eb21
Decode polymorphic relationships
brandonc Oct 20, 2023
7460950
Represent fork repo in the README
brandonc Oct 20, 2023
61e814c
Fix spelling of private const
brandonc Oct 20, 2023
9c90a4f
Rename references to "join" or "union" to "choice type"
brandonc Oct 24, 2023
448279a
Don't raise error when an invalid choice node is decoded
brandonc Oct 24, 2023
2a00bb5
Reformat code comments
brandonc Oct 25, 2023
6bdf239
Support public&private non-tagged fields in choice struct
brandonc Oct 25, 2023
43b65c2
Move test models to models_test.go
brandonc Nov 3, 2023
4ebf344
Fixes panic when a has-many relation contains nil
brandonc Nov 3, 2023
6c08cda
Marshal polyrelation
brandonc Nov 3, 2023
e9893b8
Fix go compatibility for <= 1.11
brandonc Nov 4, 2023
1037764
refactor: rename/document chooseFirstNonNilFieldValue
brandonc Nov 6, 2023
960294d
remove unused error return, enhance docs, style fixes
brandonc Nov 6, 2023
bb4d09f
Fix omitted model value for polyrelation fields
brandonc Nov 15, 2023
360ddf0
Merge pull request #13 from hashicorp/brandonc/polymorphic_relationships
brandonc Nov 15, 2023
4d8a31f
Update README.md
brandonc Nov 15, 2023
100f330
Merge pull request #16 from hashicorp/brandonc/degooglifiy
brandonc Nov 15, 2023
0044c38
Adds links to README badges
brandonc Nov 15, 2023
4b7b22a
Merge pull request #17 from hashicorp/brandonc/badge_links
brandonc Nov 15, 2023
0bf163a
feat: introduce nullable types
ctrombley Jan 4, 2024
61c1233
enforce go >=1.18
ctrombley Jan 12, 2024
3414f84
chore: allow overriding of supported nullable type map
ctrombley Jan 12, 2024
93a1527
chore: incorporate review feedback
ctrombley Jan 12, 2024
2acfcfe
tests: update tests
ctrombley Jan 12, 2024
eae9fb6
docs: document NullableAttr and provide example usage
ctrombley Jan 12, 2024
cf85dab
chore: incorporate review feedback
ctrombley Jan 12, 2024
2dbeecf
chore: incorporate review feedback
ctrombley Jan 30, 2024
0ee74e5
Merge pull request #21 from hashicorp/feat/nullable
ctrombley Jan 30, 2024
f45a873
fix: nullable null marshaling
ctrombley Jan 31, 2024
49e11fe
Merge pull request #22 from hashicorp/feat/nullable
ctrombley Jan 31, 2024
a31b22b
add 'source' to error object
jharley Jul 29, 2024
3526b7b
Apply doc. suggestions from code review
jharley Aug 2, 2024
2490a94
Merge pull request #24 from honeycombio/jharley.add-error-source-field
brandonc Aug 2, 2024
d846bbe
Add CODEOWNERS file in .github/CODEOWNERS
mukeshjc Nov 18, 2024
042320d
Merge pull request #26 from mukeshjc/main
mukeshjc Nov 19, 2024
b0c6a5b
fix: handle deprecating relation for polyrelation
notchairmk Dec 23, 2024
9e3a973
chore: comment describing when relation fields are skipped
notchairmk Jan 7, 2025
1dc4f04
Merge pull request #27 from notchairmk/notchairmk/fix-parsing-depreca…
brandonc Jan 7, 2025
9333e5c
Support nested objects within attributes when Marshaling
brandonc Jan 11, 2025
e03a6d4
Add support to Marshal slices of nested objects
brandonc Jan 13, 2025
656e9ed
refactor: visitModelNode
brandonc Jan 14, 2025
abbc3c7
Update CODEOWNERS
brandonc Jan 22, 2025
738c1fd
Merge pull request #28 from hashicorp/marshal_nested_object_attributes
brandonc Jan 22, 2025
0f6f733
Merge pull request #29 from hashicorp/brandonc/core-cloud-co-owners
brandonc Jan 22, 2025
a19fc77
add nullable relationship
netramali Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update request.go
Co-authored-by: Cameron Stitt <[email protected]>
chrisarcand and cam-stitt authored May 18, 2021

Verified

This commit was signed with the committer’s verified signature. The key has expired.
patrick-ogrady Patrick O'Grady
commit 4ff67af3cda40c1e67281919a5f154d0a11e7ed1
3 changes: 1 addition & 2 deletions request.go
Original file line number Diff line number Diff line change
@@ -346,8 +346,7 @@ func unmarshalNode(data *Node, model reflect.Value, included *map[string]*Node)
}

unmarshaledMeta := make(Meta)
meta, ok := t["meta"].(map[string]interface{})
if ok {
if meta, ok := t["meta"].(map[string]interface{}); ok {
for metaK, metaV := range meta {
unmarshaledMeta[metaK] = metaV
}