From 8c7d3b8349f9f3199819917ff33eac2b3c0a77d7 Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Thu, 26 Jul 2018 14:26:12 +0200 Subject: [PATCH] Problem: JSON schema allows output amount "0" Soluton: Change the regex to allow "1" to "9"x20 but not "0" --- bigchaindb/common/schema/transaction_v2.0.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigchaindb/common/schema/transaction_v2.0.yaml b/bigchaindb/common/schema/transaction_v2.0.yaml index 0a22b810..913a3cf5 100644 --- a/bigchaindb/common/schema/transaction_v2.0.yaml +++ b/bigchaindb/common/schema/transaction_v2.0.yaml @@ -79,7 +79,7 @@ definitions: properties: amount: type: string - pattern: "^[0-9]{1,20}$" + pattern: "^[1-9][0-9]{0,19}$" condition: type: object additionalProperties: false