diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae87a79cca91af0dea7ba508489f572c81a0d9d5..46ccaf6ab259d4d14da8d4349bb4f50ac20162cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ upload:latest: before_script: - *pre-deploy-uber-space-setup script: - - sed -i "s,API_VERSION,latest,g" dist/set-payload.schema.json + - sed -i "s,SCHEMA_VERSION,latest,g" dist/set-payload.schema.json - rsync -Lvz -e "ssh -o CheckHostIP=no" ./dist/set-payload.schema.json fitko@dorado.uberspace.de:schema.fitko.de/fit-connect/set-payload/latest/ upload:release: @@ -62,5 +62,5 @@ upload:release: before_script: - *pre-deploy-uber-space-setup script: - - sed -i "s,API_VERSION,$CI_COMMIT_TAG,g" dist/set-payload.schema.json + - sed -i "s,SCHEMA_VERSION,$CI_COMMIT_TAG,g" dist/set-payload.schema.json - rsync -Lvz -e "ssh -o CheckHostIP=no" ./dist/set-payload.schema.json fitko@dorado.uberspace.de:schema.fitko.de/fit-connect/set-payload/$CI_COMMIT_TAG/ diff --git a/examples/accept-submission_1.json b/examples/accept-submission_1.json index d02d8f72c5bdc6cda806f8281648d42776c58f82..4166ba6024d6014a232a13535184f419fa79f394 100644 --- a/examples/accept-submission_1.json +++ b/examples/accept-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "6872b19f-5ee2-47d7-a0e9-ebfe87ab2563", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/accept-submission_2.json b/examples/accept-submission_2.json index a832ef79091aea88e34809db33c8aa1c8ace6d1c..0f27da2bff9240a73dfcc937c2125ebbd97c9b1a 100644 --- a/examples/accept-submission_2.json +++ b/examples/accept-submission_2.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "8538165b-9ce3-4097-871d-5b9581a3b4d9", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/create-submission_1.json b/examples/create-submission_1.json index b3931eb33856a3b60e7a9d65f956c6a8cb6fe90f..78525284aa600e2820ad7b0a809f897cc511bc41 100644 --- a/examples/create-submission_1.json +++ b/examples/create-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "ada1b5b4-1bd2-4fab-b236-c30ef88e8c72", "iss": "https://submission-api-dev.fit-connect.fitko.dev", "iat": 1622796532, diff --git a/examples/delete-submission_1.json b/examples/delete-submission_1.json index d43dbef43e9440e34d41571fdab32d39c2c2e05f..3f4d484d2f9b9a2a38707ed08ff19f5364d3fcb0 100644 --- a/examples/delete-submission_1.json +++ b/examples/delete-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "29d091aa-86ab-4806-beb5-fb462d18e2a1", "iss": "https://submission-api-dev.fit-connect.fitko.dev", "iat": 1622796532, diff --git a/examples/forward-submission_1.json b/examples/forward-submission_1.json index ddc58de4589d8c6538ea0d11dacd3fa8cb7198bb..6e99b0d78fabfa125fff5f7c54dae0a26a9ae1ee 100644 --- a/examples/forward-submission_1.json +++ b/examples/forward-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "c0cda2aa-bf79-4427-86f3-9f973bad2ecd", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/forward-submission_2.json b/examples/forward-submission_2.json index fa9887385d6ffa83e9a5f357e6ad311fef1fa59c..10bc1430aab553291ae0475b1279655b3ad61c37 100644 --- a/examples/forward-submission_2.json +++ b/examples/forward-submission_2.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "dbf891c3-1e98-422a-b55a-d628133e5874", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/notify-submission_1.json b/examples/notify-submission_1.json index a820b2acd1e7f754c9307bcb2f27c75c5300dcd2..df4fe0bfa4fec0732bb0b01e5d6a8685259e3e13 100644 --- a/examples/notify-submission_1.json +++ b/examples/notify-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "116c3c03-5f31-4d4c-9e65-d36e1e3895f7", "iss": "https://submission-api-dev.fit-connect.fitko.dev", "iat": 1622796532, diff --git a/examples/notify-submission_1a.json b/examples/notify-submission_1a.json deleted file mode 100644 index 53fc94d5983fdeb61528a0af0079c6e8bdd75e29..0000000000000000000000000000000000000000 --- a/examples/notify-submission_1a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", - "jti": "b98af532-1f84-436e-8689-0596e91c7c66", - "iss": "https://submission-api-dev.fit-connect.fitko.dev", - "iat": 1622796532, - "sub": "submission:02bf1d9f-282d-4abf-810a-c4104baf0afe", - "txn": "case:452b5ee6-35df-441a-bd39-6141723cf914", - "events": { - "https://schema.fitko.de/fit-connect/events/notify-submission": { - "notifyType": "callback", - "callback": { - "url": "https://www.example.com/callback", - "status": 200 - } - } - } -} diff --git a/examples/notify-submission_2.json b/examples/notify-submission_2.json index a0891b46ff09c701a35b90a7af0a28604cb91cf1..cf589281cde483811fc58bb0bc9c020b9cac67b4 100644 --- a/examples/notify-submission_2.json +++ b/examples/notify-submission_2.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "6127ff87-2786-4d0f-90fe-c531672f5de1", "iss": "https://submission-api-dev.fit-connect.fitko.dev", "iat": 1622796532, diff --git a/examples/reject-submission_1.json b/examples/reject-submission_1.json index e0f943fd6eefbe1c499d5ba7acacbeae4debb94d..4eb0b174e8ed15e50b1a74f43cb35ccbd06bba4f 100644 --- a/examples/reject-submission_1.json +++ b/examples/reject-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "4ac47caa-bce1-435a-b04f-3322b224b32e", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/reject-submission_2.json b/examples/reject-submission_2.json index 880c07d7eb6eaaa3ea7612b0de502ed03ef3a105..7cb1f6acc93fa429fb7e10fc6d6f68e34d45353e 100644 --- a/examples/reject-submission_2.json +++ b/examples/reject-submission_2.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "959a274c-419f-4e87-a784-006dc404c415", "iss": "40847c29-06aa-40e2-bf28-c29884c694c4", "iat": 1622796532, diff --git a/examples/submit-submission_1.json b/examples/submit-submission_1.json index 8e99fba5e9c4d6d461d56578c02fdf09be7dae2c..922d703433ae96194fcf997a332e797b9b7c7c81 100644 --- a/examples/submit-submission_1.json +++ b/examples/submit-submission_1.json @@ -1,5 +1,5 @@ { - "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json", + "$schema": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "jti": "25d2eb77-458d-4c9d-991c-6428c4651646", "iss": "https://submission-api-dev.fit-connect.fitko.dev", "iat": 1622796532, diff --git a/spec/problems.schema.json b/spec/problems.schema.json index aef0492cb5b27f383014bdb713e0bb5fc37df392..bbf887aee65c2cf9a0943914753a097a76e699c5 100644 --- a/spec/problems.schema.json +++ b/spec/problems.schema.json @@ -6,16 +6,20 @@ "type": "object", "properties": { "type": { + "description": "Fehlercode in Form einer URI.", "type": "string", "pattern": "^https:\\/\\/schema\\.fitko\\.de\\/fit-connect\\/events\\/problems\\/[-a-z]+$" }, "title": { + "description": "Für Menschen verständliche Fehlermeldung", "type": "string" }, "detail": { + "description": "Details zum Fehler, z.B. eine technische Fehlermeldung (optional)", "type": "string" }, "instance": { + "description": "Betroffener Teil der Übertragung. Mögliche Werte: `submission`, `metadata`, `data`, `attachment:` + UUID des Attachments oder `other`", "type": "string", "pattern": "^(submission|metadata|data|attachment:.+|other)$" } diff --git a/spec/set-payload.schema.json b/spec/set-payload.schema.json index cb7505410be35fe1ce24f55d16458e6ea17ba7ac..e87f23ce6787c9d18aebb80354d6a2f252fef7a4 100644 --- a/spec/set-payload.schema.json +++ b/spec/set-payload.schema.json @@ -1,38 +1,49 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json", "title": "Security Event Token (SET)", "description": "Security Event Token (SET) nach RFC 8417", "type": "object", "properties": { "$schema": { + "description": "URI des Schemas, dem dieser Security Event Token entspricht.", "type": "string", - "enum": [ "https://schema.fitko.de/fit-connect/set-payload/1.0.0/set-payload.schema.json" ] + "enum": [ "https://schema.fitko.de/fit-connect/set-payload/SCHEMA_VERSION/set-payload.schema.json" ] }, "jti": { + "description": "Die JWT ID (jti) ist eine eindeutige UUID für das SET.", "type": "string", "format": "uuid" }, "iss": { + "description": "Als Issuer ('iss') wird die UUID der Destination eingetragen. Bei vom Zustelldienst ausgestellten SETs steht dort die Basis-URL des Zustelldienstes.", "type": "string" }, "iat": { + "description": "The 'iat' (issued at) claim identifies the time at which the JWT was issued.", "type": "integer", "minimum": 1577833200 }, "sub": { + "description": "Das Subject ('sub') enthält 'submission:' und die UUID der Submission.", "type": "string", "pattern": "^submission:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "txn": { + "description": "Der Transaction Identifier ('txn') enthält 'case:' und die UUID des Cases.", "type": "string", "pattern": "^case:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "events": { + "description": "Enthält genau eines der spezifizierten Events als Unterobjekt.", "type": "object", "properties": { "https://schema.fitko.de/fit-connect/events/create-submission": { + "description": "Mit diesem Event dokumentiert der Zustelldienst, dass eine Einreichung angelegt wurde.", "type": "object" }, "https://schema.fitko.de/fit-connect/events/submit-submission": { + "description": "Mit diesem Event dokumentiert der Zustelldienst, dass die Einreichung abgesendet wurde.", "type": "object", "properties": { "authenticationTags": { @@ -44,6 +55,7 @@ ] }, "https://schema.fitko.de/fit-connect/events/notify-submission": { + "description": "Mit diesem Event dokumentiert der Zustelldienst, dass das empfangende System Kenntnis von der Einreichung erlangt hat. Wie dies erfolgt ist, wird mit dem Eintrag `notifyType` dokumentiert.", "type": "object", "properties": { "notifyType": { @@ -59,9 +71,11 @@ ] }, "https://schema.fitko.de/fit-connect/events/forward-submission": { + "description": "Mit diesem Event dokumentiert ein nachgelagertes System, dass es die Einreichung zur Weiterleitung übernommen hat.", "type": "object" }, "https://schema.fitko.de/fit-connect/events/reject-submission": { + "description": "Mit diesem Event dokumentiert das empfangende System, dass die Einreichung zurückgewiesen wird.", "type": "object", "properties": { "problems": { @@ -73,6 +87,7 @@ ] }, "https://schema.fitko.de/fit-connect/events/accept-submission": { + "description": "Mit diesem Event dokumentiert das empfangende System, dass die Einreichung akzeptiert wurde.", "type": "object", "properties": { "problems": { @@ -87,6 +102,7 @@ ] }, "https://schema.fitko.de/fit-connect/events/delete-submission": { + "description": "Mit diesem Event dokumentiert der Zustelldienst, dass die Einreichung gelöscht wurde.", "type": "object" } },