From e452604aa0f516324ed1b493c2249dbff3f8792a Mon Sep 17 00:00:00 2001 From: Andreas Huber <andreas.huber@fjd.de> Date: Fri, 21 Aug 2020 12:35:59 +0200 Subject: [PATCH] #13 API Specification: Method of Acknowledge Application endpoint of Subscriber API should be PUT instead of POST --- reference/sender.json | 188 +++++++++++++++------------------- reference/subscriber.json | 208 +++++++++++++++++++++----------------- 2 files changed, 198 insertions(+), 198 deletions(-) diff --git a/reference/sender.json b/reference/sender.json index a27209f8..7820ba3b 100644 --- a/reference/sender.json +++ b/reference/sender.json @@ -20,110 +20,6 @@ } ], "paths": { - "/destinations/{destinationId}/applications/{applicationId}": { - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "destinationId", - "in": "path", - "required": true - }, - { - "schema": { - "type": "string" - }, - "name": "applicationId", - "in": "path", - "required": true - } - ], - "post": { - "summary": "Send Application", - "operationId": "commit-application", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../models/status-overview.json" - }, - "examples": { - "example-1": { - "value": { - "code": "queued", - "timestamp": "2020-05-20T08:31:01.135842+02:00", - "number": 2 - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - } - }, - "description": "Übertragung abschließen, Antrag absenden", - "parameters": [], - "requestBody": { - "content": { - "application/json": {} - }, - "description": "" - }, - "tags": [ - "Application Transfer" - ], - "security": [ - { - "OAuth20": [ - "{senderId}:application:apply", - "{senderId}:sender:manage" - ] - } - ] - } - }, "/destinations/{destinationId}": { "parameters": [ { @@ -631,6 +527,90 @@ ] } ] + }, + "put": { + "summary": "Send Application", + "operationId": "commit-application", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "../models/status-overview.json" + }, + "examples": { + "example-1": { + "value": { + "code": "queued", + "timestamp": "2020-05-20T08:31:01.135842+02:00", + "number": 2 + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + } + }, + "description": "Übertragung abschließen, Antrag absenden", + "parameters": [], + "requestBody": { + "content": { + "application/json": {} + }, + "description": "" + }, + "tags": [ + "Application Transfer" + ], + "security": [ + { + "OAuth20": [ + "{senderId}:application:apply", + "{senderId}:sender:manage" + ] + } + ] } }, "/destinations/{destinationId}/applications/{applicationId}/upload-status": { diff --git a/reference/subscriber.json b/reference/subscriber.json index b50b00a7..d48f6767 100644 --- a/reference/subscriber.json +++ b/reference/subscriber.json @@ -769,100 +769,6 @@ ] } ] - }, - "post": { - "summary": "Acknowledge Application", - "operationId": "ack-application", - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../models/error-body.json" - } - } - } - } - }, - "description": "Bestätigt die Abholung der Application. Über den Parameter `finalDelivery` im Body wird gesteuert, wie der Folgestatus aussieht:\n\n| final-delivery | status |\n| -------------- | ----------- |\n| `false` | \"forwarded\" |\n| `true` | \"delivered\" |\n\nDer Parameter `finalDelivery` zeigt an, ob der Antrag noch weitergesendet wird (`false`) oder das finale Ziel erreicht hat (`true`).\n\nSofern der Wert `false` übergeben wurde, muss zu einem späteren Zeitpunkt, wenn der Antrag final zugestellt wurde, ein weiterer Aufruf mit dem Wert `true` erfolgen.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "finalDelivery": { - "type": "boolean", - "description": "Zeigt an, ob die Zustellung zum nächsten Hop (`false`) oder bis zum Endpunkt (`true`) erfolgt ist." - } - }, - "required": [ - "finalDelivery" - ] - }, - "examples": { - "example-1": { - "value": { - "finalDelivery": false - } - }, - "example-2": { - "value": { - "finalDelivery": true - } - } - } - } - }, - "description": "Details der Quittung" - }, - "tags": [ - "Application Retrieval" - ], - "security": [ - { - "OAuth20": [ - "{subscriberId}:manage", - "{subscriberId}:application:receive", - "{subscriberId}:destination:{destinationId}:application:receive" - ] - } - ] } }, "/destinations/{destinationId}/applications": { @@ -1432,6 +1338,120 @@ } ] } + }, + "/destinations/{destinationId}/applications/{applicationId}/status": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "destinationId", + "in": "path", + "required": true + }, + { + "schema": { + "type": "string" + }, + "name": "applicationId", + "in": "path", + "required": true + } + ], + "put": { + "summary": "Acknowledge Application", + "operationId": "ack-application", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error-body.json" + } + } + } + } + }, + "description": "Bestätigt die Abholung der Application. Über den Parameter `finalDelivery` im Body wird gesteuert, wie der Folgestatus aussieht:\n\n| final-delivery | status |\n| -------------- | ----------- |\n| `false` | \"forwarded\" |\n| `true` | \"delivered\" |\n\nDer Parameter `finalDelivery` zeigt an, ob der Antrag noch weitergesendet wird (`false`) oder das finale Ziel erreicht hat (`true`).\n\nSofern der Wert `false` übergeben wurde, muss zu einem späteren Zeitpunkt, wenn der Antrag final zugestellt wurde, ein weiterer Aufruf mit dem Wert `true` erfolgen.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "finalDelivery": { + "type": "boolean", + "description": "Zeigt an, ob die Zustellung zum nächsten Hop (`false`) oder bis zum Endpunkt (`true`) erfolgt ist." + } + }, + "required": [ + "finalDelivery" + ] + }, + "examples": { + "example-1": { + "value": { + "finalDelivery": false + } + }, + "example-2": { + "value": { + "finalDelivery": true + } + } + } + } + }, + "description": "Details der Quittung" + }, + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "OAuth20": [ + "{subscriberId}:manage", + "{subscriberId}:application:receive", + "{subscriberId}:destination:{destinationId}:application:receive" + ] + } + ] + } } }, "tags": [ -- GitLab