Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan dynamically loaded schemas #346

Merged
merged 2 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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