diff --git a/openapi.json b/openapi.json index ca8a023..16ee668 100644 --- a/openapi.json +++ b/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Unit OpenAPI specifications", "description": "An OpenAPI specifications for unit-sdk clients", - "version": "0.0.2" + "version": "0.0.3" }, "servers": [ { diff --git a/schemas/limits.json b/schemas/account_limits.json similarity index 73% rename from schemas/limits.json rename to schemas/account_limits.json index c85b98b..5d20c1c 100644 --- a/schemas/limits.json +++ b/schemas/account_limits.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { - "$ref": "limits.json" + "$ref": "account_limits.json" }, { "type": "object", @@ -184,12 +184,108 @@ "totalsMonthly" ], "additionalProperties": false + }, + "wire": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "dailyTransfer": { + "type": "number" + }, + "monthlyTransfer": { + "type": "number" + }, + "dailyTransferSoft": { + "type": "number" + }, + "monthlyTransferSoft": { + "type": "number" + } + }, + "required": [ + "dailyTransfer", + "monthlyTransfer", + "dailyTransferSoft", + "monthlyTransferSoft" + ], + "additionalProperties": false + }, + "totalsDaily": { + "type": "object", + "properties": { + "transfers": { + "type": "number" + } + } + }, + "totalsMonthly": { + "type": "object", + "properties": { + "transfers": { + "type": "number" + } + } + } + }, + "required": [ + "limits", + "totalsDaily", + "totalsMonthly" + ], + "additionalProperties": false + }, + "checkPayment": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "dailySentSoft": { + "type": "number" + }, + "monthlySentSoft": { + "type": "number" + } + }, + "required": [ + "dailySentSoft", + "monthlySentSoft" + ], + "additionalProperties": false + }, + "totalsDaily": { + "type": "object", + "properties": { + "sent": { + "type": "number" + } + } + }, + "totalsMonthly": { + "type": "object", + "properties": { + "transfers": { + "sent": "number" + } + } + } + }, + "required": [ + "limits", + "totalsDaily", + "totalsMonthly" + ], + "additionalProperties": false } }, "required": [ "ach", "card", - "checkDeposit" + "checkDeposit", + "wire", + "checkPayment" ], "additionalProperties": false } @@ -206,7 +302,7 @@ "type": "object", "allOf": [ { - "$ref": "limits.json" + "$ref": "account_limits.json" }, { "type": "object", diff --git a/schemas/card_level_limits.json b/schemas/card_level_limits.json deleted file mode 100644 index 42bd3a5..0000000 --- a/schemas/card_level_limits.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "cardLevelLimits.json", - "definitions": { - "limits": { - "title": "Card Level Limits", - "type": "object", - "properties": { - "type": { - "type": "string", - "default": "limits" - }, - "attributes": { - "type": "object", - "properties": { - "limits": { - "$ref": "types.json#/definitions/cardLevelLimits" - }, - "dailyTotals": { - "$ref": "types.json#/definitions/cardTotals" - }, - "monthlyTotals": { - "$ref": "types.json#/definitions/cardTotals" - } - }, - "required": [ - "dailyTotals", - "monthlyTotals" - ], - "additionalProperties": false - } - }, - "additionalProperties": false, - "required": [ - "type", - "attributes" - ] - } - }, - "title": "Card Level Limits Resource", - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/limits" - } - }, - "additionalProperties": false, - "required": [ - "data" - ] -} \ No newline at end of file diff --git a/schemas/card_paths.json b/schemas/card_paths.json index 72fb65b..ee494db 100644 --- a/schemas/card_paths.json +++ b/schemas/card_paths.json @@ -1,4 +1,13 @@ { + "UnitCardResponse": { + "type": "object", + "title": "UnitCardResponse", + "properties": { + "data": { + "$ref": "card.json" + } + } + }, "cards":{ "get":{ "tags":[ @@ -120,13 +129,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -167,7 +170,7 @@ "application/vnd.api+json; charset=utf-8":{ "schema":{ "type":"object", - "title":"UnitCardResponse", + "title":"UnitCardResponseWithIncluded", "properties":{ "data":{ "$ref":"card.json" @@ -220,13 +223,7 @@ "content":{ "application/vnd.api+json":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -259,13 +256,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -298,13 +289,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -337,13 +322,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -377,7 +356,7 @@ "application/vnd.api+json; charset=utf-8":{ "schema":{ "type":"object", - "title":"UnitCardResponse", + "title":"UnitPinStatusResponse", "properties":{ "data":{ "$ref":"card.json#/definitions/pinStatus" @@ -415,13 +394,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -454,13 +427,7 @@ "content":{ "application/vnd.api+json; charset=utf-8":{ "schema":{ - "type":"object", - "title":"UnitCardResponse", - "properties":{ - "data":{ - "$ref":"card.json" - } - } + "$ref": "card_paths.json#/UnitCardResponse" } } } @@ -494,10 +461,10 @@ "application/vnd.api+json; charset=utf-8":{ "schema":{ "type":"object", - "title":"UnitCardResponse", + "title":"UnitCardLimitsResponse", "properties":{ "data":{ - "$ref":"limits.json" + "$ref":"account_limits.json" } } } diff --git a/schemas/check_deposit_paths.json b/schemas/check_deposit_paths.json index 3f73c37..7235026 100644 --- a/schemas/check_deposit_paths.json +++ b/schemas/check_deposit_paths.json @@ -284,7 +284,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitCheckDepositResponse", + "title": "UnitCheckDepositImageResponse", "properties": { "data": { "type": "string" @@ -323,7 +323,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitCheckDepositResponse", + "title": "UnitCheckDepositImageResponse", "properties": { "data": { "type": "string" diff --git a/schemas/counterparty_paths.json b/schemas/counterparty_paths.json index 630ee4d..221facd 100644 --- a/schemas/counterparty_paths.json +++ b/schemas/counterparty_paths.json @@ -261,7 +261,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitCounterpartyResponse", + "title": "UnitCounterpartyBalanceResponse", "properties": { "data": { "$ref": "counterparty_balance.json" diff --git a/schemas/event_paths.json b/schemas/event_paths.json index f79aa59..4c212b3 100644 --- a/schemas/event_paths.json +++ b/schemas/event_paths.json @@ -96,13 +96,7 @@ "content": { "application/vnd.api+json; charset=utf-8": { "schema": { - "type": "object", - "title": "UnitEventResponse", - "properties": { - "data": { - "$ref": "event.json" - } - } + "$ref": "event_paths.json#/UnitEventResponse" } } } diff --git a/schemas/transaction_paths.json b/schemas/transaction_paths.json index 380e085..d40e7be 100644 --- a/schemas/transaction_paths.json +++ b/schemas/transaction_paths.json @@ -154,7 +154,7 @@ "application/vnd.api+json; charset=utf-8": { "schema": { "type": "object", - "title": "UnitTransactionResponse", + "title": "UnitTransactionResponseWithIncluded", "properties": { "data": { "$ref": "transaction.json"