mirror of
https://github.com/ash-project/ash_money.git
synced 2024-09-19 12:53:11 +12:00
improvement: use string
not number
for amount type in json schema
This commit is contained in:
parent
12361fc487
commit
1ff276dc11
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue