diff --git a/src/Microsoft.OpenApi/Any/OpenApiAnyExtensions.cs b/src/Microsoft.OpenApi/Any/OpenApiAnyExtensions.cs new file mode 100644 index 000000000..265425c22 --- /dev/null +++ b/src/Microsoft.OpenApi/Any/OpenApiAnyExtensions.cs @@ -0,0 +1,28 @@ +//--------------------------------------------------------------------- +// +// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. +// +//--------------------------------------------------------------------- + +namespace Microsoft.OpenApi +{ + /// + /// Extension methods covert to + /// + internal static class OpenApiAnyExtensions + { + public static IOpenApiAny CreateOpenApiAny(this string input) + { + if (input == null) + { + return new OpenApiNull(); + } + + // TODO: add the logics + + + // If we can't distiguish the type, just return it as string. + return new OpenApiString(input); + } + } +}