          do: :ok
   end
 
-  def validate(%Xema.Schema{type: :string} = schema, value) do
+  def validate(%{type: :string} = schema, value) do
     with :ok <- type(schema, value),
          length <- String.length(value),
          :ok <- min_length(schema, length, value),

    end
  end

  def validate(%Xema.String{} = type, value) do
    with :ok <- type(type, value),
         length <- String.length(value),
         :ok <- min_length(type, length, value),
         :ok <- max_length(type, length, value),
         :ok <- pattern(type, value),
         :ok <- enum(type, value),
         do: :ok
  end

  def validate(%Xema.Schema{type: :list} = schema, value) do
    with :ok <- type(schema, value),
         :ok <- min_items(schema, value),
         :ok <- max_items(schema, value),

         do: :ok
  end

  def validate(%{type: :map} = schema, value) do
    with :ok <- type(schema, value),
         :ok <- size(schema, value),
         :ok <- keys(schema, value),
