fix!: Change SCIMEnterpriseAttributeOperation.Value from *string to any#3971
fix!: Change SCIMEnterpriseAttributeOperation.Value from *string to any#3971elminster-aom wants to merge 4 commits intogoogle:masterfrom
SCIMEnterpriseAttributeOperation.Value from *string to any#3971Conversation
ea7692f to
4bdbd30
Compare
|
Taking as reference this code: go-github/github/orgs_properties.go Lines 110 to 114 in 5d70283 Change the type of go test -test.fullpath=true -timeout 30s -run ^TestSCIMEnterpriseAttribute_Marshal$ github.com/google/go-github/v82/github
# github.com/google/go-github/v82/github [github.com/google/go-github/v82/github.test]
/home/aleoliva/gitRepo/go-github/github/github-accessors.go:26886:10: invalid operation: cannot indirect s.Value (variable of interface type any)
FAIL github.com/google/go-github/v82/github [build failed]
FAILUPDATE: Solved after running |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3971 +/- ##
=======================================
Coverage 93.50% 93.50%
=======================================
Files 206 206
Lines 17550 17550
=======================================
Hits 16411 16411
Misses 938 938
Partials 201 201 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SCIMEnterpriseAttributeOperation.Value from *string to any
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @elminster-aom!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra
| Op: "o2", | ||
| Op: "replace", | ||
| Path: Ptr("emails[type eq 'work'].value"), | ||
| Value: "v@3.com", |
There was a problem hiding this comment.
Just to remain consistent with rest of repo.
| Value: "v@3.com", | |
| Value: "v@example.com", |
BREAKING CHANGE:
SCIMEnterpriseAttributeOperation.Valueis changed from*stringtoany.Fixes: #3968.
From GitHub.com docs endpoint Update an attribute for a SCIM enterprise group, there are two request examples where the data for a POST request is:
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "displayName", "value": "Employees" } ] }{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "add", "path": "members", "value": [ {"value":"879db59-3bdf-4490-ad68-ab880a2694745"}, {"value":"0db508eb-91e2-46e4-809c-30dcbda0c685"} ] } ] }Similar situation for the other endpoint, Update an attribute for a SCIM enterprise user:
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "emails[type eq 'work'].value", "value": "updatedEmail@microsoft.com" }, { "op": "replace", "path": "name.familyName", "value": "updatedFamilyName" } ] }{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "userName", "value": "5b50642d-79fc-4410-9e90-4c077cdd1a59@testuser.com" }, { "op": "replace", "path": "displayName", "value": "Monalisa Octocat" } ] }{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "active", "value": false } ] }