Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Make JSON schema URLs https (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe authored Jul 29, 2024
1 parent 621f54f commit e7de163
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion hosted/json-schemas/balance.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions hosted/json-schemas/cancel.schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -8,4 +8,4 @@
"type": "string"
}
}
}
}
4 changes: 2 additions & 2 deletions hosted/json-schemas/close.schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -11,4 +11,4 @@
"type": "boolean"
}
}
}
}
4 changes: 2 additions & 2 deletions hosted/json-schemas/definitions.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -12,4 +12,4 @@
"pattern": "^([0-9]+(?:[.][0-9]+)?)$"
}
}
}
}
2 changes: 1 addition & 1 deletion hosted/json-schemas/message.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions hosted/json-schemas/offering.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions hosted/json-schemas/order.schema.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
26 changes: 13 additions & 13 deletions hosted/json-schemas/orderstatus.schema.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"$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,
"properties": {
"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"
]
},
Expand All @@ -27,4 +27,4 @@
}
},
"required": ["status"]
}
}
2 changes: 1 addition & 1 deletion hosted/json-schemas/quote.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions hosted/json-schemas/reputation.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
2 changes: 1 addition & 1 deletion hosted/json-schemas/resource.schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion hosted/json-schemas/rfq-private.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion hosted/json-schemas/rfq.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions hosted/test-vectors/protocol/vector.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"description": {
Expand All @@ -17,4 +17,4 @@
}
},
"required": ["description", "input", "error"]
}
}
6 changes: 3 additions & 3 deletions hosted/test-vectors/protocol/vectors/parse-offering.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand Down Expand Up @@ -99,4 +99,4 @@
"signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJamR6UkRBek9YZElUalZ5YnpWaFdVeHZOak14YVc5YVR6VlNkamxSUzI0MmFHcEhhbVJ3WmtoRk1Ga2lmUSMwIn0..M9yF4FtmfeTvmUyutp-k76WFDjuAfJ9fdKdY93Sg1G3KE8KCoFPCQIborK8H22MG2MYsHKZGExEzDWkwXkTbAg"
},
"error": false
}
}
4 changes: 2 additions & 2 deletions specs/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit e7de163

Please sign in to comment.