From: ebelcrom Date: Wed, 26 Feb 2020 20:21:33 +0000 (+0100) Subject: spec and .gitignore updated X-Git-Tag: v1.0.0~4 X-Git-Url: http://www.binomiant.duckdns.org/9wAuyR5S/?a=commitdiff_plain;h=1ac8f1b52555ebf409657b6d4eb2149ec485e7b3;p=garnod.git spec and .gitignore updated --- diff --git a/.gitignore b/.gitignore index 89dae9c..21ae622 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,6 @@ typings/ # next.js build output .next + +# nano backup files +*.swp diff --git a/spec/garnod.json b/spec/garnod.json index 1c31f6b..2210756 100644 --- a/spec/garnod.json +++ b/spec/garnod.json @@ -262,11 +262,11 @@ } } }, - "/test/settings": { + "/test/notification": { "post": { - "summary": "Setup settings.", - "description": "Sets behavoir resp. response settings for test area requests.

Note: the settings are activated on the next request you send within the test area. The status is not changing until the setting are changing again. An set event only occures once.

", - "operationId": "test_set_settings", + "summary": "Setup web push notification.", + "description": "To be able to send web push notifications the server has to have subscription data from the client.", + "operationId": "test_notification", "tags": [ "test" ], @@ -276,11 +276,11 @@ } ], "requestBody": { - "description": "Request body for setup settings.", + "description": "Request body for setup push notification.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/settings" + "$ref": "#/components/schemas/notification" } } } @@ -290,17 +290,19 @@ "description": "Ok, settings accepted" }, "400": { - "description": "Bad request, check settings" + "description": "Bad request, check request body" }, "401": { "$ref": "#/components/responses/error_authentication" } } - }, - "get": { - "summary": "Get current settings.", - "description": "Gets behavoir resp. response settings for test area requests.", - "operationId": "test_get_settings", + } + }, + "/test/settings": { + "post": { + "summary": "Setup settings.", + "description": "Sets behavoir resp. response settings for test area requests.

Note: the settings are activated on the next request you send within the test area. The status is not changing until the setting are changing again. An set event only occures once.

", + "operationId": "test_set_settings", "tags": [ "test" ], @@ -309,9 +311,22 @@ "api_key_auth_test": [] } ], + "requestBody": { + "description": "Request body for setup settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/settings" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/settings_result" + "description": "Ok, settings accepted" + }, + "400": { + "description": "Bad request, check settings" }, "401": { "$ref": "#/components/responses/error_authentication" diff --git a/spec/garnod.yaml b/spec/garnod.yaml index 5f7374e..cfc25e2 100644 --- a/spec/garnod.yaml +++ b/spec/garnod.yaml @@ -175,6 +175,30 @@ paths: $ref: '#/components/responses/error_param' '401': $ref: '#/components/responses/error_authentication' + /test/notification: + post: + summary: Setup web push notification. + description: >- + To be able to send web push notifications the server has to have + subscription data from the client. + operationId: test_notification + tags: + - test + security: + - api_key_auth_test: [] + requestBody: + description: Request body for setup push notification. + content: + application/json: + schema: + $ref: '#/components/schemas/notification' + responses: + '200': + description: 'Ok, settings accepted' + '400': + description: 'Bad request, check request body' + '401': + $ref: '#/components/responses/error_authentication' /test/settings: post: summary: Setup settings. @@ -201,19 +225,6 @@ paths: description: 'Bad request, check settings' '401': $ref: '#/components/responses/error_authentication' - get: - summary: Get current settings. - description: Gets behavoir resp. response settings for test area requests. - operationId: test_get_settings - tags: - - test - security: - - api_key_auth_test: [] - responses: - '200': - $ref: '#/components/responses/settings_result' - '401': - $ref: '#/components/responses/error_authentication' components: schemas: image: