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

Support custom schema extensions for users and groups #81

Merged
merged 7 commits into from
Jul 20, 2021

Conversation

manicminer
Copy link
Owner

@manicminer manicminer commented Jul 19, 2021

This introduces support for schema extension data for Groups and Users

Marshaling of schema extension data is handled automatically by the Group and User structs, enabling use of the existing Update() methods on the respective clients.

Unmarshaling is handled by either the provided msgraph.SchemaExtensionMap type, or a custom type supplied by the caller. Such a custom type must have an explicit UnmarshalJSON() method to satisfy the SchemaExtensionProperties interface. Both approaches are tested in the TestSchemaExtensionsClient() test.

@manicminer manicminer added the enhancement New feature or request label Jul 19, 2021
@manicminer manicminer added this to the v0.23.0 milestone Jul 19, 2021
@manicminer manicminer force-pushed the f/schema-extensions branch from 779a7dd to b86950e Compare July 19, 2021 14:01
@manicminer manicminer changed the title WIP Improve handling of schema extensions Support custom schema extensions for users and groups Jul 19, 2021
@manicminer manicminer marked this pull request as ready for review July 19, 2021 14:06
@MarkDordoy
Copy link
Contributor

This looks great, looking forward to using this in my project

@manicminer manicminer merged commit 526aae1 into main Jul 20, 2021
@manicminer manicminer deleted the f/schema-extensions branch July 20, 2021 21:47
@manicminer manicminer linked an issue Jul 21, 2021 that may be closed by this pull request
manicminer added a commit that referenced this pull request Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How best to support patching objects with Schema Extensions
2 participants