-Change BSON writer to write new binary subtype
-Fix BSON reader to read the old binary subtype correctly -Added JsonNet35BinaryCompadibility to BSON reader for incorrectly written BSON binary values -Changed JSON schema to use required flags instead of optional as defined in JSON schema spec 3.0 -Changed JSON schema to use divisibleBy instead of maxDecimals as defined in JSON schema spec 3.0 -Fixed detection of serialization specified flag properties -Updated to latest version of NuGet
This commit is contained in:
@@ -116,18 +116,18 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Optional()
|
||||
public void Required()
|
||||
{
|
||||
string json = @"{
|
||||
""description"":""Optional"",
|
||||
""optional"":true
|
||||
""description"":""Required"",
|
||||
""required"":true
|
||||
}";
|
||||
|
||||
JsonSchemaBuilder builder = new JsonSchemaBuilder(new JsonSchemaResolver());
|
||||
JsonSchema schema = builder.Parse(new JsonTextReader(new StringReader(json)));
|
||||
|
||||
Assert.AreEqual("Optional", schema.Description);
|
||||
Assert.AreEqual(true, schema.Optional);
|
||||
Assert.AreEqual("Required", schema.Description);
|
||||
Assert.AreEqual(true, schema.Required);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -279,7 +279,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
""maxItems"":2,
|
||||
""minLength"":5,
|
||||
""maxLength"":50,
|
||||
""maxDecimal"":3,
|
||||
""divisibleBy"":3,
|
||||
}";
|
||||
|
||||
JsonSchemaBuilder builder = new JsonSchemaBuilder(new JsonSchemaResolver());
|
||||
@@ -292,7 +292,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
Assert.AreEqual(2, schema.MaximumItems);
|
||||
Assert.AreEqual(5, schema.MinimumLength);
|
||||
Assert.AreEqual(50, schema.MaximumLength);
|
||||
Assert.AreEqual(3, schema.MaximumDecimals);
|
||||
Assert.AreEqual(3, schema.DivisibleBy);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user