You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a0c6d7f
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -10,7 +11,7 @@ public class FilterPolicy : IAsyncApiExtensible
10
11
/// <summary>
11
12
/// A map of a message attribute to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.
// Copyright (c) The LEGO Group. All rights reserved.
6
2
7
3
namespaceLEGO.AsyncAPI.Bindings
8
4
{
5
+
usingSystem;
6
+
usingSystem.Linq;
7
+
usingSystem.Text.Json;
8
+
usingSystem.Text.Json.Nodes;
9
+
usingLEGO.AsyncAPI.Models;
10
+
usingLEGO.AsyncAPI.Models.Interfaces;
11
+
usingLEGO.AsyncAPI.Readers.ParseNodes;
12
+
9
13
publicclassStringOrStringList:IAsyncApiElement
10
14
{
11
-
publicStringOrStringList(IAsyncApiAnyvalue)
15
+
publicStringOrStringList(AsyncApiAnyvalue)
12
16
{
13
-
this.Value=valueswitch
17
+
this.Value=value.Nodeswitch
14
18
{
15
-
AsyncApiArrayarray=>IsValidStringList(array)?array:thrownewArgumentException($"{nameof(StringOrStringList)} value should only contain string items."),
16
-
AsyncApiPrimitive<string>=>value,
19
+
JsonArrayarray=>IsValidStringList(array)?newAsyncApiAny(array):thrownewArgumentException($"{nameof(StringOrStringList)} value should only contain string items."),
20
+
JsonValuejValue=>IsString(jValue)?newAsyncApiAny(jValue):thrownewArgumentException($"{nameof(StringOrStringList)} should be a string value or a string list."),
17
21
_ =>thrownewArgumentException($"{nameof(StringOrStringList)} should be a string value or a string list.")
0 commit comments