Skip to content

Commit

Permalink
Validate Metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Olympic1 committed Nov 11, 2017
1 parent 3159ece commit 0258d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Types/CkanModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static CkanModule()
using (var reader = new StreamReader(stream))
{
var result = reader.ReadToEnd();
//MetadataSchema = JSchema.Parse(result);
MetadataSchema = JsonSchema4.FromSampleJson(result);
}
}

Expand All @@ -395,7 +395,7 @@ private static async Task<IList<string>> ValidateAgainstSchema(string json)
JsonSchema4 schema = await JsonSchema4.FromJsonAsync(json);

IList<string> errorList = new List<string>();
var errors = schema.Validate(json);
var errors = schema.Validate(MetadataSchema.ToJson());

foreach (var error in errors)
errorList.Add(error.ToString());
Expand Down

0 comments on commit 0258d52

Please sign in to comment.