From 56536c71f9ded4a43ffb9478b8894e00acb7713d Mon Sep 17 00:00:00 2001 From: Dmitriy Chikhanov Date: Sat, 10 Jul 2021 12:53:29 +0400 Subject: [PATCH 1/2] feat: Add api description for oauth settings --- api-admin/openapi.yaml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/api-admin/openapi.yaml b/api-admin/openapi.yaml index dd1c55b..d31b69b 100644 --- a/api-admin/openapi.yaml +++ b/api-admin/openapi.yaml @@ -69,6 +69,17 @@ paths: 500: description: Something went wrong + "/oauth/settings.get": + post: + operationId: oauthSettingsGet + tags: [OAuth] + description: Get settings for oauth requests + responses: + 200: + $ref: "#/components/responses/OAuthSettingsGet" + 500: + description: Something went wrong + "/session/create": post: operationId: sessionCreate @@ -239,7 +250,15 @@ components: - "invalid_payload" - "redirect_uri_claimed" - + OAuthSettingsGet: + description: Settings exist + content: + application/json: + schema: + properties: + user: + $ref: "#/components/schemas/OauthSettings" + SessionCreateSucceeded: description: Session created, token wrote to cookies content: @@ -394,6 +413,21 @@ components: type: boolean schemas: + OAuthSettings: + description: Settings for OAuth requests + type: object + properties: + required: + - redirectUri + - clientId + - clientSecret + redirectUri: + type: string + clientId: + type: string + clientSecret: + type: string + SessionUser: description: Current user in a session type: object From 43de0e562b11bb61a3521a9296f5148b968117df Mon Sep 17 00:00:00 2001 From: Dmitriy Chikhanov Date: Tue, 13 Jul 2021 11:15:53 +0400 Subject: [PATCH 2/2] fix: Remove client_secret, rename schema properties --- api-admin/openapi.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api-admin/openapi.yaml b/api-admin/openapi.yaml index d31b69b..309b1e0 100644 --- a/api-admin/openapi.yaml +++ b/api-admin/openapi.yaml @@ -256,7 +256,7 @@ components: application/json: schema: properties: - user: + settings: $ref: "#/components/schemas/OauthSettings" SessionCreateSucceeded: @@ -420,13 +420,10 @@ components: required: - redirectUri - clientId - - clientSecret redirectUri: type: string clientId: type: string - clientSecret: - type: string SessionUser: description: Current user in a session