   alias Xema.Mapz
   alias Xema.Ref
   alias Xema.Schema
-  alias Xema.SchemaError
   alias Xema.SchemaValidator
 
   @keywords Schema.keywords()


    case {type, keywords} do
      {type, []} -> type
      {:any, [ref: ref]} -> ref
      {:any, keywords} -> keywords
      tuple -> tuple
    end

  #
  @spec schema(any, keyword) :: Schema.t()
  defp schema(type, keywords \\ [])

  defp schema({bool, _}, _) when is_boolean(bool), do: Schema.new(type: bool)

  defp schema(%{__struct__: _, content: schema}, _), do: schema

