Skip to content

Commit

Permalink
Merge branch 'schema/builder-extension-update' of github.com:gregsden…
Browse files Browse the repository at this point in the history
…nis/json-everything into schema/builder-extension-update
  • Loading branch information
gregsdennis committed Apr 18, 2024
2 parents dc0a9bc + 262edfc commit f0e1db9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions JsonSchema/JsonSchemaExtensions.KeywordAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the schemas in `allOf` if the keyword exists.
/// </summary>
public static IReadOnlyCollection<JsonSchema>? GetAllOf(this JsonSchema schema)
public static IReadOnlyList<JsonSchema>? GetAllOf(this JsonSchema schema)
{
return schema.TryGetKeyword<AllOfKeyword>(AllOfKeyword.Name, out var k) ? k.Schemas : null;
}
Expand All @@ -45,7 +45,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the schemas in `anyOf` if the keyword exists.
/// </summary>
public static IReadOnlyCollection<JsonSchema>? GetAnyOf(this JsonSchema schema)
public static IReadOnlyList<JsonSchema>? GetAnyOf(this JsonSchema schema)
{
return schema.TryGetKeyword<AnyOfKeyword>(AnyOfKeyword.Name, out var k) ? k.Schemas : null;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the values in `examples` if the keyword exists.
/// </summary>
public static IReadOnlyCollection<JsonNode?>? GetExamples(this JsonSchema schema)
public static IReadOnlyList<JsonNode?>? GetExamples(this JsonSchema schema)
{
return schema.TryGetKeyword<ExamplesKeyword>(ExamplesKeyword.Name, out var k) ? k.Values : null;
}
Expand Down Expand Up @@ -253,7 +253,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the schemas in `items` if the keyword exists and is an array of schemas.
/// </summary>
public static IReadOnlyCollection<JsonSchema>? GetItemsArrayForm(this JsonSchema schema)
public static IReadOnlyList<JsonSchema>? GetItemsArrayForm(this JsonSchema schema)
{
return schema.TryGetKeyword<ItemsKeyword>(ItemsKeyword.Name, out var k) ? k.ArraySchemas : null;
}
Expand Down Expand Up @@ -357,7 +357,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the schemas in `oneOf` if the keyword exists.
/// </summary>
public static IReadOnlyCollection<JsonSchema>? GetOneOf(this JsonSchema schema)
public static IReadOnlyList<JsonSchema>? GetOneOf(this JsonSchema schema)
{
return schema.TryGetKeyword<OneOfKeyword>(OneOfKeyword.Name, out var k) ? k.Schemas : null;
}
Expand All @@ -381,7 +381,7 @@ public static partial class JsonSchemaExtensions
/// <summary>
/// Gets the schemas in `prefixItems` if the keyword exists.
/// </summary>
public static IReadOnlyCollection<JsonSchema>? GetPrefixItems(this JsonSchema schema)
public static IReadOnlyList<JsonSchema>? GetPrefixItems(this JsonSchema schema)
{
return schema.TryGetKeyword<PrefixItemsKeyword>(PrefixItemsKeyword.Name, out var k) ? k.ArraySchemas : null;
}
Expand Down

0 comments on commit f0e1db9

Please sign in to comment.