diff --git a/JsonSchema/JsonSchema.csproj b/JsonSchema/JsonSchema.csproj
index 56a1ebc178..3aa193d623 100644
--- a/JsonSchema/JsonSchema.csproj
+++ b/JsonSchema/JsonSchema.csproj
@@ -16,8 +16,8 @@
https://github.com/gregsdennis/json-everything
https://github.com/gregsdennis/json-everything
json-schema validation schema json
- 6.0.7
- 6.0.7.0
+ 6.1.0
+ 6.1.0.0
6.0.0.0
LICENSE
JsonSchema.Net
diff --git a/JsonSchema/JsonSchemaExtensions.KeywordAccess.cs b/JsonSchema/JsonSchemaExtensions.KeywordAccess.cs
index a2baa68bbb..2227096e73 100644
--- a/JsonSchema/JsonSchemaExtensions.KeywordAccess.cs
+++ b/JsonSchema/JsonSchemaExtensions.KeywordAccess.cs
@@ -29,7 +29,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the schemas in `allOf` if the keyword exists.
///
- public static IReadOnlyCollection? GetAllOf(this JsonSchema schema)
+ public static IReadOnlyList? GetAllOf(this JsonSchema schema)
{
return schema.TryGetKeyword(AllOfKeyword.Name, out var k) ? k.Schemas : null;
}
@@ -45,7 +45,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the schemas in `anyOf` if the keyword exists.
///
- public static IReadOnlyCollection? GetAnyOf(this JsonSchema schema)
+ public static IReadOnlyList? GetAnyOf(this JsonSchema schema)
{
return schema.TryGetKeyword(AnyOfKeyword.Name, out var k) ? k.Schemas : null;
}
@@ -197,7 +197,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the values in `examples` if the keyword exists.
///
- public static IReadOnlyCollection? GetExamples(this JsonSchema schema)
+ public static IReadOnlyList? GetExamples(this JsonSchema schema)
{
return schema.TryGetKeyword(ExamplesKeyword.Name, out var k) ? k.Values : null;
}
@@ -253,7 +253,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the schemas in `items` if the keyword exists and is an array of schemas.
///
- public static IReadOnlyCollection? GetItemsArrayForm(this JsonSchema schema)
+ public static IReadOnlyList? GetItemsArrayForm(this JsonSchema schema)
{
return schema.TryGetKeyword(ItemsKeyword.Name, out var k) ? k.ArraySchemas : null;
}
@@ -357,7 +357,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the schemas in `oneOf` if the keyword exists.
///
- public static IReadOnlyCollection? GetOneOf(this JsonSchema schema)
+ public static IReadOnlyList? GetOneOf(this JsonSchema schema)
{
return schema.TryGetKeyword(OneOfKeyword.Name, out var k) ? k.Schemas : null;
}
@@ -381,7 +381,7 @@ public static partial class JsonSchemaExtensions
///
/// Gets the schemas in `prefixItems` if the keyword exists.
///
- public static IReadOnlyCollection? GetPrefixItems(this JsonSchema schema)
+ public static IReadOnlyList? GetPrefixItems(this JsonSchema schema)
{
return schema.TryGetKeyword(PrefixItemsKeyword.Name, out var k) ? k.ArraySchemas : null;
}
diff --git a/tools/ApiDocsGenerator/release-notes/rn-json-schema.md b/tools/ApiDocsGenerator/release-notes/rn-json-schema.md
index 908de26b1f..50f4bfba1e 100644
--- a/tools/ApiDocsGenerator/release-notes/rn-json-schema.md
+++ b/tools/ApiDocsGenerator/release-notes/rn-json-schema.md
@@ -4,6 +4,10 @@ title: JsonSchema.Net
icon: fas fa-tag
order: "09.01"
---
+# [6.1.0](https://github.com/gregsdennis/json-everything/pull/709) {#release-schema-6.1.0}
+
+[#704](https://github.com/gregsdennis/json-everything/issues/704) - Several builder extension return types expanded from `IReadOnlyCollection` to `IReadOnlyList`. Thanks to [@SGStino](https://github.com/SGStino) for identifying and implementing this.
+
# [6.0.7](https://github.com/gregsdennis/json-everything/pull/698) {#release-schema-6.0.7}
[#697](https://github.com/gregsdennis/json-everything/issues/697) - `allOf`, `anyOf`, `oneOf`, and `prefixItems` all require at least one subschema, but deserialization of these keywords didn't enforce this. Fix will throw `ArgumentException` when attempting to deserialize empty subschema sets. Thanks to [@Era-cell](https://github.com/Era-cell) for reporting this.