internal static OpenApiSchema CreateSchemaTypeSchema(this ODataContext context, IEdmType edmType)
        {
            Debug.Assert(context != null);
            Debug.Assert(edmType != null);

            switch (edmType.TypeKind)
            {
            case EdmTypeKind.Complex:    // complex type
            case EdmTypeKind.Entity:     // entity type
                return(context.CreateStructuredTypeSchema((IEdmStructuredType)edmType, true, true));

            case EdmTypeKind.Enum:     // enum type
                return(context.CreateEnumTypeSchema((IEdmEnumType)edmType));

            case EdmTypeKind.TypeDefinition:     // type definition
                return(context.CreateSchemaTypeDefinitionSchema((IEdmTypeDefinition)edmType));

            case EdmTypeKind.None:
            default:
                throw Error.NotSupported(String.Format(SRResource.NotSupportedEdmTypeKind, edmType.TypeKind));
            }
        }