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 new type alias StringNullWhenEmpty for nullable string values #59

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

manicminer
Copy link
Owner

@manicminer manicminer commented Jun 15, 2021

  • This enables zeroing field values that don't accept blank strings
  • Also tidy up models and split value types into another file
  • Support PersonalMicrosoftAccount for application signInAudience

Example usage

displayName := "test group no description"
description := msgraph.StringNullWhenEmpty("")
mailEnabled := false
securityEnabled := true

props := msgraph.Group{
	DisplayName:     &displayName,
	Description:     &description,
	MailEnabled:     &mailEnabled,
	SecurityEnabled: &securityEnabled,
}

group, _, err := client.Create(ctx, props)

Generates the following request body:

{
  "description": null,
  "displayName": "test group no description",
  "mailEnabled": false,
  "securityEnabled": true,
}

…dy up models and split value types into another file
@manicminer manicminer added enhancement New feature or request breaking change Indicates a non-backwards compatible change labels Jun 15, 2021
@manicminer manicminer added this to the v0.17.0 milestone Jun 15, 2021
@manicminer manicminer merged commit f240167 into main Jun 15, 2021
@manicminer manicminer deleted the null-strings branch June 15, 2021 10:14
manicminer added a commit that referenced this pull request Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Indicates a non-backwards compatible change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant