-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REFACTORING: changing readability of records and repairing reactive s…
…treams in GithubService
- Loading branch information
Showing
5 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.example.githubservice.model; | ||
|
||
public record Branch(String name, Commit commit) { | ||
|
||
public record Branch( | ||
String name, | ||
Commit commit | ||
) { | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
package org.example.githubservice.model; | ||
|
||
public record Commit(String sha) { | ||
public record Commit( | ||
String sha | ||
) { | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package org.example.githubservice.model; | ||
|
||
public record Owner(String login) { | ||
|
||
public record Owner( | ||
String login | ||
) { | ||
} |
11 changes: 10 additions & 1 deletion
11
src/main/java/org/example/githubservice/model/Repository.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
package org.example.githubservice.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
public record Repository(String name, Owner owner, Boolean fork, String branchesUrl, List<Branch> branches) { | ||
public record Repository( | ||
String name, | ||
Owner owner, | ||
Boolean fork, | ||
@JsonProperty("branches_url") | ||
String branchesUrl, | ||
List<Branch> branches | ||
) { | ||
} |
This file contains 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