From 0a0d8d53a47b17472c8e3461e6a5ed0ceaa379f1 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 18 Mar 2020 23:30:27 +0900 Subject: [PATCH] Improve redoc --- .../wwwroot/swagger/v1/swagger.template.json | 65 +++---------------- 1 file changed, 10 insertions(+), 55 deletions(-) diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.json index db8b1ce93..84067ab08 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.json @@ -24,7 +24,7 @@ "parameters": [ { "name": "permissions", - "description": "The permissions to request. Current permissions available: ServerManagement, StoreManagement, ProfileManagement", + "description": "The permissions to request. (See APIKey authentication)", "in": "query", "style": "form", "explode": true, @@ -243,58 +243,6 @@ } ] } - }, - "/api/v1/users/me/api-keys/current": { - "get": { - "tags": [ - "API Keys" - ], - "summary": "Get current API Key information", - "description": "View information about the current API key", - "operationId": "ApiKeys_GetKey2", - "responses": { - "200": { - "description": "Information about the current api key", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKeyData" - } - } - } - } - }, - "security": [ - { - "APIKey": [] - } - ] - }, - "delete": { - "tags": [ - "API Keys" - ], - "summary": "Revoke the current API Key", - "description": "Revoke the current API key so that it cannot be used anymore", - "operationId": "ApiKeys_RevokeKey2", - "responses": { - "200": { - "description": "The key was revoked and is no longer usable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKeyData" - } - } - } - } - }, - "security": [ - { - "APIKey": [] - } - ] - } } }, "components": { @@ -403,15 +351,22 @@ "securitySchemes": { "APIKey": { "type": "apiKey", - "description": "BTCPay Server supports authenticating and authorizing users through an API Key that is generated by them. Send the API Key as a header value to Authorization with the format: token {token}. For a smoother experience, you can generate a url that redirects users to an API key creation screen.", + "description": "BTCPay Server supports authenticating and authorizing users through an API Key that is generated by them. Send the API Key as a header value to Authorization with the format: token {token}. For a smoother experience, you can generate a url that redirects users to an API key creation screen.\n\n You can create API Keys in the user profile / Api Keys. (Available are: ServerManagement, StoreManagement, ProfileManagement)", "name": "Authorization", "in": "header" + }, + "Anonymous": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "Nothing required", + "description": "Anonymous authentication" } } }, "security": [ { - "APIKey": [] + "APIKey": [], + "Anonymous": [] } ], "tags": [