From f62ba04387976dc2d297ee11fbeda0a4fd9df889 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 2 Apr 2024 08:27:30 +0000 Subject: [PATCH] JSON Schema Update --- config/v3/p2p_advert_create/receive.json | 10 +--------- config/v3/p2p_advert_create/send.json | 9 +-------- config/v3/p2p_advert_info/receive.json | 10 +--------- config/v3/p2p_advert_list/receive.json | 10 +--------- config/v3/p2p_advert_update/receive.json | 10 +--------- config/v3/p2p_advert_update/send.json | 9 +-------- config/v3/p2p_advertiser_adverts/receive.json | 10 +--------- config/v3/p2p_settings/receive.json | 9 +++++++++ 8 files changed, 16 insertions(+), 61 deletions(-) diff --git a/config/v3/p2p_advert_create/receive.json b/config/v3/p2p_advert_create/receive.json index 3d3e41f4..9b7d65d9 100644 --- a/config/v3/p2p_advert_create/receive.json +++ b/config/v3/p2p_advert_create/receive.json @@ -293,15 +293,7 @@ }, "order_expiry_period": { "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "type": "integer" }, "payment_info": { "description": "Payment instructions. Only applicable for 'sell adverts'.", diff --git a/config/v3/p2p_advert_create/send.json b/config/v3/p2p_advert_create/send.json index b156ecd8..dc877283 100644 --- a/config/v3/p2p_advert_create/send.json +++ b/config/v3/p2p_advert_create/send.json @@ -102,14 +102,7 @@ "order_expiry_period": { "description": "[Optional] Expiry period (seconds) for order created against this ad.", "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "minimum": 1 }, "payment_info": { "description": "[Optional] Payment instructions.", diff --git a/config/v3/p2p_advert_info/receive.json b/config/v3/p2p_advert_info/receive.json index 3ebd7c33..ce681a6e 100644 --- a/config/v3/p2p_advert_info/receive.json +++ b/config/v3/p2p_advert_info/receive.json @@ -318,15 +318,7 @@ }, "order_expiry_period": { "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "type": "integer" }, "payment_info": { "description": "Payment instructions. Only applicable for 'sell adverts'.", diff --git a/config/v3/p2p_advert_list/receive.json b/config/v3/p2p_advert_list/receive.json index 056c1d72..ba881b6f 100644 --- a/config/v3/p2p_advert_list/receive.json +++ b/config/v3/p2p_advert_list/receive.json @@ -347,15 +347,7 @@ }, "order_expiry_period": { "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "type": "integer" }, "payment_info": { "description": "Payment instructions. Only applicable for 'sell adverts'.", diff --git a/config/v3/p2p_advert_update/receive.json b/config/v3/p2p_advert_update/receive.json index 314d9713..b81837f4 100644 --- a/config/v3/p2p_advert_update/receive.json +++ b/config/v3/p2p_advert_update/receive.json @@ -271,15 +271,7 @@ }, "order_expiry_period": { "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "type": "integer" }, "payment_info": { "description": "Payment instructions. Only applicable for 'sell adverts'.", diff --git a/config/v3/p2p_advert_update/send.json b/config/v3/p2p_advert_update/send.json index 4d046ffe..4b4a5133 100644 --- a/config/v3/p2p_advert_update/send.json +++ b/config/v3/p2p_advert_update/send.json @@ -116,14 +116,7 @@ "order_expiry_period": { "description": "[Optional] Expiry period (seconds) for order created against this ad.", "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "minimum": 1 }, "payment_info": { "description": "[Optional] Payment instructions.", diff --git a/config/v3/p2p_advertiser_adverts/receive.json b/config/v3/p2p_advertiser_adverts/receive.json index 58f34c25..d3501aef 100644 --- a/config/v3/p2p_advertiser_adverts/receive.json +++ b/config/v3/p2p_advertiser_adverts/receive.json @@ -309,15 +309,7 @@ }, "order_expiry_period": { "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [ - 900, - 1800, - 2700, - 3600, - 5400, - 7200 - ] + "type": "integer" }, "payment_info": { "description": "Payment instructions. Only applicable for 'sell adverts'.", diff --git a/config/v3/p2p_settings/receive.json b/config/v3/p2p_settings/receive.json index 5ee3dfe8..2bc771f5 100644 --- a/config/v3/p2p_settings/receive.json +++ b/config/v3/p2p_settings/receive.json @@ -30,6 +30,7 @@ "maximum_advert_amount", "maximum_order_amount", "order_daily_limit", + "order_expiry_options", "order_payment_period", "payment_methods_enabled", "review_period", @@ -209,6 +210,14 @@ "description": "Maximum number of orders a user may create per day.", "type": "integer" }, + "order_expiry_options": { + "description": "List of order expiry values available for adverts, in seconds.", + "type": "array", + "items": { + "type": "integer" + }, + "uniqueItems": true + }, "order_payment_period": { "description": "Time allowed for order payment, in minutes after order creation.", "type": "integer"