diff --git a/Octokit.Tests/SimpleJsonSerializerTests.cs b/Octokit.Tests/SimpleJsonSerializerTests.cs index 2677211a78..ddfe21dd0f 100644 --- a/Octokit.Tests/SimpleJsonSerializerTests.cs +++ b/Octokit.Tests/SimpleJsonSerializerTests.cs @@ -203,6 +203,19 @@ public void RespectsParameterKeyName() Assert.Equal("blah", result.Links); } + + [Fact] + public void DefaultsMissingParameters() + { + const string json = @"{""private"":true}"; + + var sample = new SimpleJsonSerializer().Deserialize(json); + + Assert.Equal(0, sample.Id); + Assert.Equal(null, sample.FirstName); + Assert.False(sample.IsSomething); + Assert.True(sample.Private); + } } public class Sample diff --git a/Octokit/Models/Response/TreeResponse.cs b/Octokit/Models/Response/TreeResponse.cs index 19414a0420..1f985920f2 100644 --- a/Octokit/Models/Response/TreeResponse.cs +++ b/Octokit/Models/Response/TreeResponse.cs @@ -24,6 +24,11 @@ public class TreeResponse /// public IReadOnlyList Tree { get; protected set; } + /// + /// Whether the response was truncated due to GitHub API limits. + /// + public bool Truncated { get; protected set; } + internal string DebuggerDisplay { get