Skip to content

Commit

Permalink
Merge pull request #346 from gregsdennis/schema-scan-dynamically-load…
Browse files Browse the repository at this point in the history
…ed-schemas

scan dynamically loaded schemas
  • Loading branch information
gregsdennis committed Nov 11, 2022
2 parents 37d3aac + cf701df commit 4e8a8f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions JsonSchema.Tests/Suite/Suite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ private static IEnumerable<TestCaseData> GetTests(string draftFolder)
collection.IsOptional = fileName.Contains("optional");
foreach (var test in collection.Tests)
{
var optional = collection.IsOptional ? "(optional)/" : null;
var name = $"{draftFolder}/{shortFileName}/{optional}{collection.Description.Kebaberize()}/{test.Description.Kebaberize()}";
var optional = collection.IsOptional ? "(optional) / " : null;
var name = $"{draftFolder} / {shortFileName} / {optional}{collection.Description} / {test.Description}";
var optionsCopy = ValidationOptions.From(options);
allTests.Add(new TestCaseData(collection, test, shortFileName, optionsCopy) { TestName = name });
}
Expand Down
4 changes: 2 additions & 2 deletions JsonSchema/JsonSchema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageProjectUrl>https://github.com/gregsdennis/json-everything</PackageProjectUrl>
<RepositoryUrl>https://github.com/gregsdennis/json-everything</RepositoryUrl>
<PackageTags>json-schema validation schema json</PackageTags>
<Version>3.3.0</Version>
<FileVersion>3.3.0.0</FileVersion>
<Version>3.3.1</Version>
<FileVersion>3.3.1.0</FileVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<AssemblyName>JsonSchema.Net</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion JsonSchema/SchemaRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ internal bool DynamicScopeDefinesAnchor(Uri uri, string anchor)
var schema = Fetch(uri) ?? Global.Fetch(uri);
if (schema == null) return null;

RegisterSchema(uri, schema);
Register(uri, schema);
//schema.RegisterSubschemas(this, uri);
registration = CheckRegistry(_registered!, uri);
}
Expand Down
4 changes: 4 additions & 0 deletions json-everything.net/wwwroot/md/release-notes/json-schema.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [3.3.1](https://github.com/gregsdennis/json-everything/pull/346)

Fixed issue where dynamically-loaded schemas were not scanned for URI identifier keywords. Was not an issue if all referenced schemas were explicitly reloaded.

# [3.3.0](https://github.com/gregsdennis/json-everything/pull/344)

[#340](https://github.com/gregsdennis/json-everything/issues/340) - Added `ValidationOptions.ProcessCustomKeywords` to allow custom keywords for schema versions 2019-09 and later.
Expand Down

0 comments on commit 4e8a8f2

Please sign in to comment.