Skip to content

Commit

Permalink
fix: Ignore null values
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi347 committed Sep 1, 2023
1 parent ac575bb commit 28905dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/com/spotify/github/v3/orgs/requests/TeamCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package com.spotify.github.v3.orgs.requests;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
Expand All @@ -33,6 +34,7 @@
@GithubStyle
@JsonSerialize(as = ImmutableTeamCreate.class)
@JsonDeserialize(as = ImmutableTeamCreate.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public interface TeamCreate {

/** The name of the team. */
Expand All @@ -51,10 +53,15 @@ public interface TeamCreate {
Optional<String> privacy();

/**
* The notification setting the team has chosen. The options are: notifications_enabled - team
* members receive notifications when the team is @mentioned. notifications_disabled - no one
* receives notifications. Default: notifications_enabled Can be one of: notifications_enabled,
* notifications_disabled
* The notification setting the team has chosen. The options are:
*
* <p>notifications_enabled - team members receive notifications when the team is @mentioned.
*
* <p>notifications_disabled - no one receives notifications.
*
* <p>Default: notifications_enabled
*
* <p>Can be one of: notifications_enabled, notifications_disabled
*/
@Nullable
@Value.Default
Expand All @@ -76,7 +83,7 @@ default List<String> maintainers() {
@Nullable
@Value.Default
@JsonProperty("repo_names")
default List<String> repoNames(){
default List<String> repoNames() {
return List.of();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package com.spotify.github.v3.orgs.requests;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
Expand All @@ -32,6 +33,7 @@
@GithubStyle
@JsonSerialize(as = ImmutableTeamUpdate.class)
@JsonDeserialize(as = ImmutableTeamUpdate.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public interface TeamUpdate {

/** The name of the team. */
Expand Down

0 comments on commit 28905dd

Please sign in to comment.