Fix OpenAPI 3.0 validation errors and warnings (#4235)

This commit is contained in:
d11n 2022-10-25 13:37:36 +02:00 committed by GitHub
parent 2e150f4bf4
commit f4af4ec4dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 445 additions and 52 deletions

View File

@ -27,7 +27,7 @@
}, },
"security": [ "security": [
{ {
"API_Key": [ "unrestricted" ], "API_Key": ["unrestricted"],
"Basic": [] "Basic": []
} }
] ]
@ -51,6 +51,16 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -76,6 +86,16 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -103,6 +123,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"requestBody": { "requestBody": {
@ -170,7 +210,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "API Keys" "name": "API Keys",
"description": "API Key operations"
} }
] ]
} }

View File

@ -365,7 +365,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Apps" "name": "Apps",
"description": "App operations"
} }
] ]
} }

View File

@ -82,12 +82,17 @@
"200": { "200": {
"description": "A HTML form that a user can use to confirm permissions to grant", "description": "A HTML form that a user can use to confirm permissions to grant",
"content": { "content": {
"text/html": { "text/html": {}
}
} }
}, },
"307": { "307": {
"description": "Makes browser do an HTTP POST request to the specified url in `redirect` with a JSON body consisting of `apiKey` (the api key created or matched), `permissions` (the permissions the user consented to), and `userId` (the id of the user that consented) upon consent" "description": "Makes browser do an HTTP POST request to the specified url in `redirect` with a JSON body consisting of `apiKey` (the api key created or matched), `permissions` (the permissions the user consented to), and `userId` (the id of the user that consented) upon consent"
},
"401": {
"description": "Missing authorization",
"content": {
"text/html": {}
}
} }
}, },
"security": [] "security": []
@ -96,7 +101,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Authorization" "name": "Authorization",
"description": "Authorization operations"
} }
] ]
} }

View File

@ -10,7 +10,7 @@
"operationId": "Custodians_GetSupportedCustodians", "operationId": "Custodians_GetSupportedCustodians",
"responses": { "responses": {
"200": { "200": {
"description": "list of supported custodians", "description": "List of supported custodians",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
@ -1125,7 +1125,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Custodians" "name": "Custodians",
"description": "Custodian operations"
} }
] ]
} }

View File

@ -18,6 +18,16 @@
} }
} }
} }
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [] "security": []
@ -40,7 +50,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Health" "name": "Health",
"description": "Health operations"
} }
] ]
} }

View File

@ -90,7 +90,7 @@
"operationId": "Invoices_GetInvoices", "operationId": "Invoices_GetInvoices",
"responses": { "responses": {
"200": { "200": {
"description": "list of invoices", "description": "List of invoices",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
@ -98,6 +98,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -1243,7 +1263,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Invoices" "name": "Invoices",
"description": "Invoice operations"
} }
] ]
} }

View File

@ -115,6 +115,5 @@
"API_Key": [], "API_Key": [],
"Basic": [] "Basic": []
} }
], ]
"tags": []
} }

View File

@ -582,8 +582,28 @@
} }
} }
}, },
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"503": { "503": {
"description": "Unable to access the lightning node" "description": "Unable to access the lightning node"
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -665,7 +685,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Lightning (Internal Node)" "name": "Lightning (Internal Node)",
"description": "Lightning (Internal Node) operations"
} }
] ]
} }

View File

@ -673,8 +673,28 @@
} }
} }
}, },
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"503": { "503": {
"description": "Unable to access the lightning node" "description": "Unable to access the lightning node"
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -765,7 +785,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Lightning (Store)" "name": "Lightning (Store)",
"description": "Lightning (Store) operations"
} }
] ]
} }

View File

@ -32,6 +32,16 @@
} }
} }
} }
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [] "security": []
@ -73,6 +83,16 @@
} }
} }
} }
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [] "security": []
@ -111,6 +131,16 @@
} }
} }
} }
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [] "security": []
@ -160,7 +190,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Miscelleneous" "name": "Miscelleneous",
"description": "Miscelleneous operations"
} }
] ]
} }

View File

@ -251,7 +251,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Notifications (Current User)" "name": "Notifications (Current User)",
"description": "Notifications operations"
} }
] ]
} }

View File

@ -19,7 +19,7 @@
"operationId": "PaymentRequests_GetPaymentRequests", "operationId": "PaymentRequests_GetPaymentRequests",
"responses": { "responses": {
"200": { "200": {
"description": "list of payment requests", "description": "List of payment requests",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
@ -27,6 +27,16 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -374,7 +384,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Payment Requests" "name": "Payment Requests",
"description": "Payment Requests operations"
} }
] ]
} }

View File

@ -648,10 +648,12 @@
}, },
"tags": [ "tags": [
{ {
"name": "Stores (Payout Processors)" "name": "Stores (Payout Processors)",
"description": "Stores (Payout Processors) operations"
}, },
{ {
"name": "Payout Processors" "name": "Payout Processors",
"description": "Payout Processors operations"
} }
] ]
} }

View File

@ -879,13 +879,16 @@
}, },
"tags": [ "tags": [
{ {
"name": "Pull payments (Management)" "name": "Pull payments (Management)",
"description": "Pull payments (Management) operations"
}, },
{ {
"name": "Pull payments (Public)" "name": "Pull payments (Public)",
"description": "Pull payments (Public) operations"
}, },
{ {
"name": "Pull payments payout (Public)" "name": "Pull payments payout (Public)",
"description": "Pull payments payout (Public) operations"
} }
] ]
} }

View File

@ -18,6 +18,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -116,7 +136,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "ServerInfo" "name": "ServerInfo",
"description": "Server Info operations"
} }
] ]
} }

View File

@ -222,7 +222,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Stores (Email)" "name": "Stores (Email)",
"description": "Store Emails operations"
} }
] ]
} }

View File

@ -41,6 +41,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -92,7 +112,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Store Payment Methods" "name": "Store Payment Methods",
"description": "Store Payment Methods operations"
} }
] ]
} }

View File

@ -30,7 +30,7 @@
"operationId": "StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethods", "operationId": "StoreLightningNetworkPaymentMethods_GetLightningNetworkPaymentMethods",
"responses": { "responses": {
"200": { "200": {
"description": "list of payment methods", "description": "List of payment methods",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
@ -38,6 +38,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -311,7 +331,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Store Payment Methods (Lightning Network)" "name": "Store Payment Methods (Lightning Network)",
"description": "Store Payment Methods (Lightning Network) operations"
} }
] ]
} }

View File

@ -38,6 +38,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -90,11 +110,35 @@
} }
} }
}, },
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": { "403": {
"description": "If you are authenticated but forbidden to view the specified store" "description": "If you are authenticated but forbidden to view the specified store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}, },
"404": { "404": {
"description": "The key is not found for this store/payment method" "description": "The key is not found for this store/payment method",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -293,7 +337,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Store Payment Methods (LNURL Pay)" "name": "Store Payment Methods (LNURL Pay)",
"description": "Store Payment Methods (LNURL Pay) operations"
} }
] ]
} }

View File

@ -30,7 +30,7 @@
], ],
"responses": { "responses": {
"200": { "200": {
"description": "list of payment methods", "description": "List of payment methods",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
@ -38,6 +38,26 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -697,7 +717,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Store Payment Methods (On Chain)" "name": "Store Payment Methods (On Chain)",
"description": "Store Payment Methods (On Chain) operations"
} }
] ]
} }

View File

@ -144,6 +144,7 @@
], ],
"summary": "Preview rate configuration results", "summary": "Preview rate configuration results",
"description": "Preview rate configuration results before you set it on the store", "description": "Preview rate configuration results before you set it on the store",
"operationId": "Stores_PreviewStoreRateConfiguration",
"requestBody": { "requestBody": {
"x-name": "request", "x-name": "request",
"content": { "content": {
@ -186,7 +187,7 @@
}, },
"security": [ "security": [
{ {
"API Key": [ "API_Key": [
"btcpay.store.canmodifystoresettings" "btcpay.store.canmodifystoresettings"
], ],
"Basic": [] "Basic": []
@ -245,8 +246,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Stores (Rates Config)" "name": "Stores (Rates Config)",
"description": "Store Rates Config operations"
} }
] ]
} }

View File

@ -215,7 +215,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Stores (Users)" "name": "Stores (Users)",
"description": "Store Users operations"
} }
] ]
} }

View File

@ -920,7 +920,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Store Wallet (On Chain)" "name": "Store Wallet (On Chain)",
"description": "Store Wallet (On Chain) operations"
} }
] ]
} }

View File

@ -18,6 +18,16 @@
} }
} }
} }
},
"401": {
"description": "Missing authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
} }
}, },
"security": [ "security": [
@ -424,7 +434,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Stores" "name": "Stores",
"description": "Store operations"
} }
] ]
} }

View File

@ -359,7 +359,8 @@
}, },
"tags": [ "tags": [
{ {
"name": "Users" "name": "Users",
"description": "User operations"
} }
] ]
} }

View File

@ -827,7 +827,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoiceExpired": { "InvoiceExpired": {
@ -859,7 +870,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoiceReceivedPayment": { "InvoiceReceivedPayment": {
@ -891,7 +913,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoicePaymentSettled": { "InvoicePaymentSettled": {
@ -923,7 +956,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoiceProcessing": { "InvoiceProcessing": {
@ -955,7 +999,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoiceInvalid": { "InvoiceInvalid": {
@ -987,7 +1042,18 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
}, },
"InvoiceSettled": { "InvoiceSettled": {
@ -1019,13 +1085,25 @@
} }
} }
}, },
"responses": {} "responses": {
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
} }
} }
}, },
"tags": [ "tags": [
{ {
"name": "Webhooks" "name": "Webhooks",
"description": "Webhook operations"
} }
] ]
} }