-Marked old JsonSchema implementation as obsolete

This commit is contained in:
James Newton-King
2014-12-29 12:15:18 +13:00
parent a2e15adf80
commit c714bae747
59 changed files with 610 additions and 108 deletions
@@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#pragma warning disable 618
using System;
using System.Collections;
using System.Collections.Generic;
@@ -775,35 +776,6 @@ namespace Newtonsoft.Json.Tests.Schema
{
public SortTypeFlagAsString y;
}
#if !ASPNETCORE50
[Test]
[Ignore]
public void GenerateSchemaWithStringEnum()
{
JsonSchemaGenerator jsonSchemaGenerator = new JsonSchemaGenerator();
JsonSchema schema = jsonSchemaGenerator.Generate(typeof(Y));
string json = schema.ToString();
// NOTE: This fails because the enum is serialized as an integer and not a string.
// NOTE: There should exist a way to serialize the enum as lowercase strings.
Assert.AreEqual(@"{
""type"": ""object"",
""properties"": {
""y"": {
""required"": true,
""type"": ""string"",
""enum"": [
""no"",
""asc"",
""desc""
]
}
}
}", json);
}
#endif
}
public class NullableInt32TestClass
@@ -874,4 +846,5 @@ namespace Newtonsoft.Json.Tests.Schema
public class BulkInsertTask_DSL
{
}
}
}
#pragma warning restore 618