Closed David-Klemenc closed 2 days ago
OpenApiSpex.Schema.cast and OpenApiSpex.cast_value return different results when casting 1
OpenApiSpex.Schema.cast
OpenApiSpex.cast_value
1
iex> float_schema = %OpenApiSpex.Schema{type: :number, format: :float} %OpenApiSpex.Schema%{type: :number, format: :float} iex> OpenApiSpex.Schema.cast(float_schema, 1, %{}) {:ok, 1.0} iex> OpenApiSpex.cast_value(1, float_schema) {:ok, 1}
The correct response should be {:ok, 1.0} for OpenApiSpex.cast_value(1, float_schema)
{:ok, 1.0}
OpenApiSpex.cast_value(1, float_schema)
This is a simlar issue to: #84
Fixed in #611, thanks @David-Klemenc
OpenApiSpex.Schema.cast
andOpenApiSpex.cast_value
return different results when casting1
The correct response should be
{:ok, 1.0}
forOpenApiSpex.cast_value(1, float_schema)
This is a simlar issue to: #84