From 06c91e2ed018bdc55323351cb2d19db26b3ab51a Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 24 Jun 2021 22:36:00 +0300 Subject: [PATCH 1/3] docs(api-admin): add remove app metod | openapi docs --- api-admin/openapi.yaml | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/api-admin/openapi.yaml b/api-admin/openapi.yaml index 008a424..bb15da6 100644 --- a/api-admin/openapi.yaml +++ b/api-admin/openapi.yaml @@ -24,6 +24,21 @@ paths: 500: description: Something goes wrong + "/applications/app.remove": + post: + operationId: applicationsAppRemove + tags: [ Applications ] + description: Create new app request + requestBody: + $ref: "#/components/requestBodies/ApplicationAppRemove" + responses: + 200: + $ref: "#/components/responses/ApplicationAppRemoveDone" + 400: + $ref: "#/components/responses/ApplicationAppRemoveFailure" + 500: + description: Something went wrong + components: responses: OAuthAuthorizeDone: @@ -91,7 +106,55 @@ components: The client will be using this to associate this response with the initial request. type: string + ApplicationAppRemoveDone: + description: App was deleted. + content: + application/json: + schema: + required: + - success + properties: + success: + type: boolean + + ApplicationAppRemoveFailure: + description: + There are two different kinds of errors to handle. The first kind of error is when the developer did something wrong when creating the request. +
+ If there is something wrong with the syntax of the request + content: + application/json: + schema: + required: + - error + properties: + code: + description: | + Possible errors:
+ `invalid_request` — The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed.
+ `temporarily_unavailable` — The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
+ type: string + enum: + - invalid_request + - temporarily_unavailable + - unauthenticated_user + - unauthorized_client + requestBodies: + ApplicationAppRemove: + required: true + content: + application/json: + schema: + required: + - appId + properties: + appId: + description: The appId is the unique identifier of your new app. + type: string + format: uuid + example: 41190cee-5231-4dcc-8167-ebf798b55ce3 + OAuthAuthorize: required: true content: From 2648ac109ff09ad16fea910feb7a58bde88fe3f4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 26 Jun 2021 00:09:52 +0300 Subject: [PATCH 2/3] docs(api-admin): fix review comments --- api-admin/openapi.yaml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/api-admin/openapi.yaml b/api-admin/openapi.yaml index bb15da6..273ad62 100644 --- a/api-admin/openapi.yaml +++ b/api-admin/openapi.yaml @@ -24,18 +24,18 @@ paths: 500: description: Something goes wrong - "/applications/app.remove": + "/applications.remove": post: - operationId: applicationsAppRemove + operationId: appRemove tags: [ Applications ] description: Create new app request requestBody: - $ref: "#/components/requestBodies/ApplicationAppRemove" + $ref: "#/components/requestBodies/AppRemove" responses: 200: - $ref: "#/components/responses/ApplicationAppRemoveDone" + $ref: "#/components/responses/AppRemoveDone" 400: - $ref: "#/components/responses/ApplicationAppRemoveFailure" + $ref: "#/components/responses/AppRemoveFailure" 500: description: Something went wrong @@ -106,7 +106,7 @@ components: The client will be using this to associate this response with the initial request. type: string - ApplicationAppRemoveDone: + AppRemoveDone: description: App was deleted. content: application/json: @@ -117,31 +117,30 @@ components: success: type: boolean - ApplicationAppRemoveFailure: + AppRemoveFailure: description: - There are two different kinds of errors to handle. The first kind of error is when the developer did something wrong when creating the request. -
- If there is something wrong with the syntax of the request + Happens when something went wrong after attemp to remove application content: application/json: schema: required: - - error - properties: + - code + properties: code: description: | Possible errors:
- `invalid_request` — The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed.
- `temporarily_unavailable` — The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
+ `access_denied` — This error occures when user's session was expired | user doesn't have enough permission | or user unauthorized + `invalid_request` — Something was wrong with user request.
type: string enum: + - access_denied - invalid_request - - temporarily_unavailable - - unauthenticated_user - - unauthorized_client + redirectUri: + type: string + format: url requestBodies: - ApplicationAppRemove: + AppRemove: required: true content: application/json: @@ -150,7 +149,7 @@ components: - appId properties: appId: - description: The appId is the unique identifier of your new app. + description: The unique identifier of your app. type: string format: uuid example: 41190cee-5231-4dcc-8167-ebf798b55ce3 From e09d48fe94f16f3673937d0c03e3ae74155a418c Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 26 Jun 2021 00:26:06 +0300 Subject: [PATCH 3/3] docs(api-admin): fix error description --- api-admin/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-admin/openapi.yaml b/api-admin/openapi.yaml index 273ad62..1a22efe 100644 --- a/api-admin/openapi.yaml +++ b/api-admin/openapi.yaml @@ -129,7 +129,7 @@ components: code: description: | Possible errors:
- `access_denied` — This error occures when user's session was expired | user doesn't have enough permission | or user unauthorized + `access_denied` — This error occures when user's session was expired | user doesn't have enough permission | or user unauthorized.
`invalid_request` — Something was wrong with user request.
type: string enum: