spec and .gitignore updated
authorebelcrom <ebelcrom@gmail.com>
Wed, 26 Feb 2020 20:21:33 +0000 (21:21 +0100)
committerebelcrom <ebelcrom@gmail.com>
Wed, 26 Feb 2020 20:21:33 +0000 (21:21 +0100)
.gitignore
spec/garnod.json
spec/garnod.yaml

index 89dae9c49b2aca13cea3f593eee51382f84ecb98..21ae6221e32efb4a5798d2b676d1b2d50ac99ecb 100644 (file)
@@ -62,3 +62,6 @@ typings/
 
 # next.js build output
 .next
+
+# nano backup files
+*.swp
index 1c31f6bf2d6cce2c1a29f3c2917e353dba38652d..221075606d548cbd31fa89c9ca365a4b8cfc026a 100644 (file)
         }
       }
     },
-    "/test/settings": {
+    "/test/notification": {
       "post": {
-        "summary": "Setup settings.",
-        "description": "Sets behavoir resp. response settings for test area requests. <p><b>Note</b>: 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.</p>",
-        "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"
         ],
           }
         ],
         "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"
               }
             }
           }
             "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. <p><b>Note</b>: 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.</p>",
+        "operationId": "test_set_settings",
         "tags": [
           "test"
         ],
             "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"
index 5f7374e81c32e19cbd4b05175059e2e069cf0632..cfc25e299c9a63bc2244eadc572d5ee64bd03539 100644 (file)
@@ -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: