Skip to content

Commit 9f83e7c

Browse files
committed
Moved validation against schema definition to class library.
1 parent b847db2 commit 9f83e7c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/DataWarehouseAutomation.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The interface itself is a Json schema definition (JSDL) with examples on how to
3131

3232
<ItemGroup>
3333
<PackageReference Include="Handlebars.Net" Version="2.1.4" />
34+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
35+
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.15" />
3436
</ItemGroup>
3537

3638
</Project>

ClassLibrary/DataWarehouseAutomation/Test_Project/JsonValidation.cs renamed to ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/JsonValidation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
using Newtonsoft.Json.Linq;
55
using Newtonsoft.Json.Schema;
66

7-
namespace Test_Project;
7+
namespace DataWarehouseAutomation;
8+
89

910
public class JsonValidation
1011
{

ClassLibrary/DataWarehouseAutomation/Test_Project/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using DataWarehouseAutomation;
34

45
namespace Test_Project
56
{
@@ -29,9 +30,6 @@ static void Main(string[] args)
2930
fileList.Add(sampleTemplateDirectory + @"sampleVDW_Sat_Customer_v161.json"); // Validating a Json generated by TEAM / VDW
3031
fileList.Add(sampleTemplateDirectory + @"sampleVDW_StagingArea.json"); // Validating a Json generated by TEAM / VDW
3132

32-
33-
34-
3533
foreach (string jsonFile in fileList)
3634
{
3735
var result = JsonValidation.ValidateJsonFileAgainstSchema(jsonSchema, jsonFile);

0 commit comments

Comments
 (0)