From e7de163fbbdeadbeb556955485617fc6294adcf8 Mon Sep 17 00:00:00 2001 From: Kendall Weihe Date: Mon, 29 Jul 2024 19:18:10 -0400 Subject: [PATCH] Make JSON schema URLs https (#357) --- hosted/json-schemas/balance.schema.json | 2 +- hosted/json-schemas/cancel.schema.json | 4 +-- hosted/json-schemas/close.schema.json | 4 +-- hosted/json-schemas/definitions.json | 4 +-- hosted/json-schemas/message.schema.json | 2 +- hosted/json-schemas/offering.schema.json | 6 ++--- hosted/json-schemas/order.schema.json | 4 +-- hosted/json-schemas/orderstatus.schema.json | 26 +++++++++---------- hosted/json-schemas/quote.schema.json | 2 +- hosted/json-schemas/reputation.schema.json | 4 +-- hosted/json-schemas/resource.schema.json | 2 +- hosted/json-schemas/rfq-private.schema.json | 2 +- hosted/json-schemas/rfq.schema.json | 2 +- .../test-vectors/protocol/vector.schema.json | 4 +-- .../protocol/vectors/parse-offering.json | 6 ++--- specs/protocol/README.md | 4 +-- 16 files changed, 39 insertions(+), 39 deletions(-) diff --git a/hosted/json-schemas/balance.schema.json b/hosted/json-schemas/balance.schema.json index 0ee265bf..c1987750 100644 --- a/hosted/json-schemas/balance.schema.json +++ b/hosted/json-schemas/balance.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/balance.schema.json", "type": "object", "properties": { diff --git a/hosted/json-schemas/cancel.schema.json b/hosted/json-schemas/cancel.schema.json index bcd8f3a5..88d47d66 100644 --- a/hosted/json-schemas/cancel.schema.json +++ b/hosted/json-schemas/cancel.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/cancel.schema.json", "type": "object", "additionalProperties": false, @@ -8,4 +8,4 @@ "type": "string" } } - } \ No newline at end of file + } diff --git a/hosted/json-schemas/close.schema.json b/hosted/json-schemas/close.schema.json index 7b15c50f..a8e55852 100644 --- a/hosted/json-schemas/close.schema.json +++ b/hosted/json-schemas/close.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/close.schema.json", "type": "object", "additionalProperties": false, @@ -11,4 +11,4 @@ "type": "boolean" } } -} \ No newline at end of file +} diff --git a/hosted/json-schemas/definitions.json b/hosted/json-schemas/definitions.json index 83f55ed4..5665392a 100644 --- a/hosted/json-schemas/definitions.json +++ b/hosted/json-schemas/definitions.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/definitions.json", "type": "object", "definitions": { @@ -12,4 +12,4 @@ "pattern": "^([0-9]+(?:[.][0-9]+)?)$" } } -} \ No newline at end of file +} diff --git a/hosted/json-schemas/message.schema.json b/hosted/json-schemas/message.schema.json index ebe7c4bc..36c4880d 100644 --- a/hosted/json-schemas/message.schema.json +++ b/hosted/json-schemas/message.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/message.schema.json", "definitions": { "MessageMetadata": { diff --git a/hosted/json-schemas/offering.schema.json b/hosted/json-schemas/offering.schema.json index 3e1588b3..3d367f82 100644 --- a/hosted/json-schemas/offering.schema.json +++ b/hosted/json-schemas/offering.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/offering.schema.json", "type": "object", "properties": { @@ -47,7 +47,7 @@ "description": "Value that can be used to group specific payment methods together (e.g. Mobile Money vs. Direct Bank Deposit)." }, "requiredPaymentDetails": { - "$ref": "http://json-schema.org/draft-07/schema#", + "$ref": "https://json-schema.org/draft-07/schema#", "description": "A JSON Schema containing the fields that need to be collected in order to use this payment method" }, "min": { @@ -108,7 +108,7 @@ "description": "Value that can be used to group specific payment methods together (e.g. Mobile Money vs. Direct Bank Deposit)." }, "requiredPaymentDetails": { - "$ref": "http://json-schema.org/draft-07/schema#", + "$ref": "https://json-schema.org/draft-07/schema#", "description": "A JSON Schema containing the fields that need to be collected in order to use this payment method" }, "min": { diff --git a/hosted/json-schemas/order.schema.json b/hosted/json-schemas/order.schema.json index 5ace8afb..84502e66 100644 --- a/hosted/json-schemas/order.schema.json +++ b/hosted/json-schemas/order.schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/order.schema.json", "type": "object", "additionalProperties": false, "properties": {} -} \ No newline at end of file +} diff --git a/hosted/json-schemas/orderstatus.schema.json b/hosted/json-schemas/orderstatus.schema.json index 90192077..1e9688ab 100644 --- a/hosted/json-schemas/orderstatus.schema.json +++ b/hosted/json-schemas/orderstatus.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/orderstatus.schema.json", "type": "object", "additionalProperties": false, @@ -7,18 +7,18 @@ "status": { "type":"string", "enum": [ - "PAYIN_PENDING", - "PAYIN_INITIATED", - "PAYIN_SETTLED", - "PAYIN_FAILED", + "PAYIN_PENDING", + "PAYIN_INITIATED", + "PAYIN_SETTLED", + "PAYIN_FAILED", "PAYIN_EXPIRED", - "PAYOUT_PENDING", - "PAYOUT_INITIATED", - "PAYOUT_SETTLED", - "PAYOUT_FAILED", - "REFUND_PENDING", - "REFUND_INITIATED", - "REFUND_SETTLED", + "PAYOUT_PENDING", + "PAYOUT_INITIATED", + "PAYOUT_SETTLED", + "PAYOUT_FAILED", + "REFUND_PENDING", + "REFUND_INITIATED", + "REFUND_SETTLED", "REFUND_FAILED" ] }, @@ -27,4 +27,4 @@ } }, "required": ["status"] -} \ No newline at end of file +} diff --git a/hosted/json-schemas/quote.schema.json b/hosted/json-schemas/quote.schema.json index 1198c438..e701bd9e 100644 --- a/hosted/json-schemas/quote.schema.json +++ b/hosted/json-schemas/quote.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/quote.schema.json", "definitions": { "QuoteDetails": { diff --git a/hosted/json-schemas/reputation.schema.json b/hosted/json-schemas/reputation.schema.json index 9e08fbfe..56da00a6 100644 --- a/hosted/json-schemas/reputation.schema.json +++ b/hosted/json-schemas/reputation.schema.json @@ -1,4 +1,4 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/reputation.schema.json" -} \ No newline at end of file +} diff --git a/hosted/json-schemas/resource.schema.json b/hosted/json-schemas/resource.schema.json index e933d9a6..8998c1fb 100644 --- a/hosted/json-schemas/resource.schema.json +++ b/hosted/json-schemas/resource.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/resource.schema.json", "type": "object", "additionalProperties": false, diff --git a/hosted/json-schemas/rfq-private.schema.json b/hosted/json-schemas/rfq-private.schema.json index 9010c5ee..62c25d8a 100644 --- a/hosted/json-schemas/rfq-private.schema.json +++ b/hosted/json-schemas/rfq-private.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/rfq-private.schema.json", "type": "object", "properties": { diff --git a/hosted/json-schemas/rfq.schema.json b/hosted/json-schemas/rfq.schema.json index 4c20337b..004dee6b 100644 --- a/hosted/json-schemas/rfq.schema.json +++ b/hosted/json-schemas/rfq.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://tbdex.dev/rfq.schema.json", "type": "object", "properties": { diff --git a/hosted/test-vectors/protocol/vector.schema.json b/hosted/test-vectors/protocol/vector.schema.json index a5f4bfaf..06d23c7f 100644 --- a/hosted/test-vectors/protocol/vector.schema.json +++ b/hosted/test-vectors/protocol/vector.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "description": { @@ -17,4 +17,4 @@ } }, "required": ["description", "input", "error"] -} \ No newline at end of file +} diff --git a/hosted/test-vectors/protocol/vectors/parse-offering.json b/hosted/test-vectors/protocol/vectors/parse-offering.json index bfcf2d56..2dccd50b 100644 --- a/hosted/test-vectors/protocol/vectors/parse-offering.json +++ b/hosted/test-vectors/protocol/vectors/parse-offering.json @@ -1,6 +1,6 @@ { "description": "Offering parses from string", - "input": "{\"metadata\": {\"from\": \"did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5IiwieCI6IjdzRDAzOXdITjVybzVhWUxvNjMxaW9aTzVSdjlRS242aGpHamRwZkhFMFkifQ\",\"kind\": \"offering\",\"id\": \"offering_01j2h97kkre7tanx9d4cj1zv6e\",\"createdAt\": \"2024-07-11T16:15:14Z\",\"updatedAt\": \"2024-07-11T16:15:14Z\",\"protocol\": \"1.0\"},\"data\": {\"description\": \"USDC for USD\",\"payoutUnitsPerPayinUnit\": \"1.0\",\"payin\": {\"currencyCode\": \"USD\",\"min\": \"0.1\",\"max\": \"1000\",\"methods\": [{\"kind\": \"DEBIT_CARD\",\"requiredPaymentDetails\": {\"$schema\": \"http://json-schema.org/draft-07/schema#\",\"type\": \"object\",\"properties\": {\"cardNumber\": {\"type\": \"string\",\"description\": \"The 16-digit debit card number\",\"minLength\": 16,\"maxLength\": 16},\"expiryDate\": {\"type\": \"string\",\"description\": \"The expiry date of the card in MM/YY format\",\"pattern\": \"^(0[1-9]|1[0-2])\\\\/([0-9]{2})$\"},\"cardHolderName\": {\"type\": \"string\",\"description\": \"Name of the cardholder as it appears on the card\"},\"cvv\": {\"type\": \"string\",\"description\": \"The 3-digit CVV code\",\"minLength\": 3,\"maxLength\": 3}},\"required\": [\"cardNumber\",\"expiryDate\",\"cardHolderName\",\"cvv\"],\"additionalProperties\": false}}]},\"payout\": {\"currencyCode\": \"USDC\",\"max\": \"5000\",\"methods\": [{\"kind\": \"STORED_BALANCE\",\"estimatedSettlementTime\": 1200}]},\"requiredClaims\": {\"id\": \"foo\",\"name\": \"kyccredential\",\"purpose\": \"To verify the identity of the user\",\"input_descriptors\": [{\"id\": \"1\",\"name\": \"KYC Information\",\"purpose\": \"To verify the identity of the user\",\"constraints\": {\"fields\": [{\"path\": [\"$.type[0]\"],\"filter\": {\"type\": \"string\",\"pattern\": \"KYC\"}}]}}]},\"cancellation\": {\"enabled\": false}},\"signature\": \"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJamR6UkRBek9YZElUalZ5YnpWaFdVeHZOak14YVc5YVR6VlNkamxSUzI0MmFHcEhhbVJ3WmtoRk1Ga2lmUSMwIn0..M9yF4FtmfeTvmUyutp-k76WFDjuAfJ9fdKdY93Sg1G3KE8KCoFPCQIborK8H22MG2MYsHKZGExEzDWkwXkTbAg\"}", + "input": "{\"metadata\": {\"from\": \"did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5IiwieCI6IjdzRDAzOXdITjVybzVhWUxvNjMxaW9aTzVSdjlRS242aGpHamRwZkhFMFkifQ\",\"kind\": \"offering\",\"id\": \"offering_01j2h97kkre7tanx9d4cj1zv6e\",\"createdAt\": \"2024-07-11T16:15:14Z\",\"updatedAt\": \"2024-07-11T16:15:14Z\",\"protocol\": \"1.0\"},\"data\": {\"description\": \"USDC for USD\",\"payoutUnitsPerPayinUnit\": \"1.0\",\"payin\": {\"currencyCode\": \"USD\",\"min\": \"0.1\",\"max\": \"1000\",\"methods\": [{\"kind\": \"DEBIT_CARD\",\"requiredPaymentDetails\": {\"$schema\": \"https://json-schema.org/draft-07/schema#\",\"type\": \"object\",\"properties\": {\"cardNumber\": {\"type\": \"string\",\"description\": \"The 16-digit debit card number\",\"minLength\": 16,\"maxLength\": 16},\"expiryDate\": {\"type\": \"string\",\"description\": \"The expiry date of the card in MM/YY format\",\"pattern\": \"^(0[1-9]|1[0-2])\\\\/([0-9]{2})$\"},\"cardHolderName\": {\"type\": \"string\",\"description\": \"Name of the cardholder as it appears on the card\"},\"cvv\": {\"type\": \"string\",\"description\": \"The 3-digit CVV code\",\"minLength\": 3,\"maxLength\": 3}},\"required\": [\"cardNumber\",\"expiryDate\",\"cardHolderName\",\"cvv\"],\"additionalProperties\": false}}]},\"payout\": {\"currencyCode\": \"USDC\",\"max\": \"5000\",\"methods\": [{\"kind\": \"STORED_BALANCE\",\"estimatedSettlementTime\": 1200}]},\"requiredClaims\": {\"id\": \"foo\",\"name\": \"kyccredential\",\"purpose\": \"To verify the identity of the user\",\"input_descriptors\": [{\"id\": \"1\",\"name\": \"KYC Information\",\"purpose\": \"To verify the identity of the user\",\"constraints\": {\"fields\": [{\"path\": [\"$.type[0]\"],\"filter\": {\"type\": \"string\",\"pattern\": \"KYC\"}}]}}]},\"cancellation\": {\"enabled\": false}},\"signature\": \"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJamR6UkRBek9YZElUalZ5YnpWaFdVeHZOak14YVc5YVR6VlNkamxSUzI0MmFHcEhhbVJ3WmtoRk1Ga2lmUSMwIn0..M9yF4FtmfeTvmUyutp-k76WFDjuAfJ9fdKdY93Sg1G3KE8KCoFPCQIborK8H22MG2MYsHKZGExEzDWkwXkTbAg\"}", "output": { "metadata": { "from": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5IiwieCI6IjdzRDAzOXdITjVybzVhWUxvNjMxaW9aTzVSdjlRS242aGpHamRwZkhFMFkifQ", @@ -21,7 +21,7 @@ { "kind": "DEBIT_CARD", "requiredPaymentDetails": { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "cardNumber": { @@ -99,4 +99,4 @@ "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJamR6UkRBek9YZElUalZ5YnpWaFdVeHZOak14YVc5YVR6VlNkamxSUzI0MmFHcEhhbVJ3WmtoRk1Ga2lmUSMwIn0..M9yF4FtmfeTvmUyutp-k76WFDjuAfJ9fdKdY93Sg1G3KE8KCoFPCQIborK8H22MG2MYsHKZGExEzDWkwXkTbAg" }, "error": false -} \ No newline at end of file +} diff --git a/specs/protocol/README.md b/specs/protocol/README.md index 4259f499..81727163 100644 --- a/specs/protocol/README.md +++ b/specs/protocol/README.md @@ -215,7 +215,7 @@ Some payment methods should be consistent across PFIs and therefore have reserve { "kind": "DEBIT_CARD", "requiredPaymentDetails": { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "cardNumber": { @@ -259,7 +259,7 @@ Some payment methods should be consistent across PFIs and therefore have reserve "kind": "BTC_ADDRESS", "estimatedSettlementTime": 3600, "requiredPaymentDetails": { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "btcAddress": {