We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9f3a94 commit 9ae9565Copy full SHA for 9ae9565
src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs
@@ -72,6 +72,21 @@ public static JsonSchemaType ToJsonSchemaType(this string identifier)
72
};
73
}
74
75
+ /// <summary>
76
+ /// Converts a schema type's identifier into the enum equivalent
77
+ /// </summary>
78
+ /// <param name="identifier"></param>
79
+ /// <returns></returns>
80
+ public static JsonSchemaType ToJsonSchemaType(this string[] identifier)
81
+ {
82
+ JsonSchemaType type = 0;
83
+ foreach (var id in identifier)
84
85
+ type |= id.ToJsonSchemaType();
86
+ }
87
+ return type;
88
89
+
90
private static readonly Dictionary<Type, Func<OpenApiSchema>> _simpleTypeToOpenApiSchema = new()
91
{
92
[typeof(bool)] = () => new() { Type = JsonSchemaType.Boolean },
0 commit comments