Repository navigation
refactor!: Add ProvisionAndInviteSCIMUserRequest and pass it by value to ProvisionAndInviteSCIMUser - #4697
Merged
gmlewis merged 2 commits intoOct 31, 2026
Conversation
…ue to `ProvisionAndInviteSCIMUser`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4697 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 203 203
Lines 19027 19027
=======================================
Hits 18769 18769
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Oct 31, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562 and @Not-Dhananjay-Mishra!
LGTM.
Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #3644.
BREAKING CHANGE:
SCIMService.ProvisionAndInviteSCIMUsernow takes a newProvisionAndInviteSCIMUserRequestby value instead of*SCIMUserAttributes.ProvisionAndInviteSCIMUser(POST /scim/v2/organizations/{org}/Users) used the response typeSCIMUserAttributesas its request body. That type has response-only fields (ID,Meta) andRoles, none of which are in the request schema. This PR adds a request type with exactly the properties of the request schema, the same way as the existingUpdateProvisionedOrgMembershipRequestforPUT /scim/v2/organizations/{org}/Users/{scim_user_id}.Two commits:
feat- Add the properties of thescim-userresponse schema thatSCIMUserAttributeswas missing:organization_id(OrganizationID),profileUrl(ProfileURL), andoperations(Operations, which reusesUpdateAttributeForSCIMUserOperationsbecause the item schema is the sameop/path/value). TheGetSCIMProvisioningInfoForUsertest now decodes them.refactor!- AddProvisionAndInviteSCIMUserRequestand pass it by value.userName,name, andemailsare required in the schema, so they are not pointers and have no omit option. The optional slicesSchemasandGroupsuseomitzero.SCIMUserAttributesis removed frombody-allowed-pointer-types, and the test checks the request body withtestJSONBody.The method name already matches the GitHub docs operation name ("Provision and invite a SCIM user"), so it is not renamed.
Verified locally:
go build ./...,go vet -tags integration ./test/integration/,examplemodule build,go test ./github/, generated files idempotent,custom-gcl0 issues, andscript/check-schema-fields.shreports nothing for the SCIM types. (It reports 4 new warnings forEnterpriseUpdateBudget, but master reports the same 4 since theopenapi_commitupdate in #4693, so they are not from this PR.)