Skip to content

Commit

Permalink
improvement: use string not number for amount type in json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Aug 8, 2024
1 parent 12361fc commit 1ff276d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ash_money/types/money.ex
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,13 @@ defmodule AshMoney.Types.Money do
%{
type: "object",
properties: %{
amount: %{type: "number"},
amount: %{type: "string", pattern: "^-?\\d+(\\.\\d+)?$"},
currency: %{type: "string"}
},
example: %{
amount: "100.00",
currency: "USD"
},
required: ["amount", "currency"]
}
end
Expand Down

0 comments on commit 1ff276d

Please sign in to comment.