From 209508e263d8a796e958abb11b016cac1fffa349 Mon Sep 17 00:00:00 2001 From: Andreas Huber <andreas.huber@fjd.de> Date: Mon, 8 Feb 2021 10:43:42 +0100 Subject: [PATCH] #36 JSON sollte ein Objekt sein --- reference/2_subscriber.json | 418 +++++++++++++++++++----------------- 1 file changed, 217 insertions(+), 201 deletions(-) diff --git a/reference/2_subscriber.json b/reference/2_subscriber.json index 2ca4f75f..61ef42fe 100644 --- a/reference/2_subscriber.json +++ b/reference/2_subscriber.json @@ -30,127 +30,134 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "../models/destination.json" + "type": "object", + "properties": { + "destinations": { + "type": "array", + "items": { + "$ref": "../models/destination.json" + } + } } }, "examples": { "example-1": { - "value": [ - { - "publicOrganization": { - "organizationName": "Gewerbeamt Musterstadt", - "address": { - "type": "national", - "street": "Kurzer Weg", - "houseNumber": "7", - "postalCode": "12345", - "city": "Ankh-Morpork" - }, - "contact": { - "telephones": [ - { - "number": "+49 89 32168-0", - "mobile": false, - "description": "work" - } - ], - "email": "behoerde@example.com" - } - }, - "technicalContact": [ - { - "formOfAddress": "Herr", - "doctoralDegrees": "Dr.", - "firstName": "Kunibert", - "lastName": "Vonundzu", + "value": { + "destinations": [ + { + "publicOrganization": { + "organizationName": "Gewerbeamt Musterstadt", + "address": { + "type": "national", + "street": "Kurzer Weg", + "houseNumber": "7", + "postalCode": "12345", + "city": "Ankh-Morpork" + }, "contact": { "telephones": [ { - "number": "+49 89 32168-42", + "number": "+49 89 32168-0", "mobile": false, "description": "work" - }, - { - "number": "+49 123 456789", - "mobile": true, - "description": "work" } ], - "email": "kunibert.vonundzu@example.com" + "email": "behoerde@example.com" } - } - ], - "schemas": [ - { - "mimeType": "json", - "schemaSource": "none", - "encoding": "plain" - } - ], - "callback": { - "callbackURI": "http://127.0.0.1:4010/voluptas" - }, - "destinationId": "0ddf3ab5-dd89-4e04-9ecd-b2c50b0b4efd" - }, - { - "publicOrganization": { - "organizationName": "Gewerbeamt Musterstadt", - "address": { - "type": "national", - "street": "Kurzer Weg", - "houseNumber": "7", - "postalCode": "12345", - "city": "Ankh-Morpork" }, - "contact": { - "telephones": [ - { - "number": "+49 89 32168-0", - "mobile": false, - "description": "work" + "technicalContact": [ + { + "formOfAddress": "Herr", + "doctoralDegrees": "Dr.", + "firstName": "Kunibert", + "lastName": "Vonundzu", + "contact": { + "telephones": [ + { + "number": "+49 89 32168-42", + "mobile": false, + "description": "work" + }, + { + "number": "+49 123 456789", + "mobile": true, + "description": "work" + } + ], + "email": "kunibert.vonundzu@example.com" } - ], - "email": "behoerde@example.com" - } + } + ], + "schemas": [ + { + "mimeType": "json", + "schemaSource": "none", + "encoding": "plain" + } + ], + "callback": { + "callbackURI": "http://127.0.0.1:4010/voluptas" + }, + "destinationId": "0ddf3ab5-dd89-4e04-9ecd-b2c50b0b4efd" }, - "technicalContact": [ - { - "formOfAddress": "Herr", - "doctoralDegrees": "Dr.", - "firstName": "Kunibert", - "lastName": "Vonundzu", + { + "publicOrganization": { + "organizationName": "Gewerbeamt Musterstadt", + "address": { + "type": "national", + "street": "Kurzer Weg", + "houseNumber": "7", + "postalCode": "12345", + "city": "Ankh-Morpork" + }, "contact": { "telephones": [ { - "number": "+49 89 32168-42", + "number": "+49 89 32168-0", "mobile": false, "description": "work" - }, - { - "number": "+49 123 456789", - "mobile": true, - "description": "work" } ], - "email": "kunibert.vonundzu@example.com" + "email": "behoerde@example.com" } - } - ], - "schemas": [ - { - "mimeType": "json", - "schemaSource": "none", - "encoding": "plain" - } - ], - "callback": { - "callbackURI": "http://127.0.0.1:4010/voluptas" - }, - "destinationId": "7881dba9-4055-4854-8b6d-11ea5b7f3047" - } - ] + }, + "technicalContact": [ + { + "formOfAddress": "Herr", + "doctoralDegrees": "Dr.", + "firstName": "Kunibert", + "lastName": "Vonundzu", + "contact": { + "telephones": [ + { + "number": "+49 89 32168-42", + "mobile": false, + "description": "work" + }, + { + "number": "+49 123 456789", + "mobile": true, + "description": "work" + } + ], + "email": "kunibert.vonundzu@example.com" + } + } + ], + "schemas": [ + { + "mimeType": "json", + "schemaSource": "none", + "encoding": "plain" + } + ], + "callback": { + "callbackURI": "http://127.0.0.1:4010/voluptas" + }, + "destinationId": "7881dba9-4055-4854-8b6d-11ea5b7f3047" + } + ] + } } } } @@ -329,7 +336,7 @@ { "mimeType": "json", "schemaSource": "none", - "encoding": "plain" + "encoding": "plain" } ], "callback": { @@ -805,120 +812,129 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "../models/application/metadata.json" + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "../models/application/metadata.json" + } + } } }, "examples": { "example-1": { - "value": [] + "value": { + "applications": [] + } }, "example-2": { - "value": [ - { - "additionalReferenceInfo": { - "subject": "Anmeldung eines Gewerbes in Musterstadt", - "caseId": "DF/8923" - }, - "contentStructure": { - "data": { - "schema": { - "mimeType": "json", - "schemaSource": "none" - } + "value": { + "applications": [ + { + "additionalReferenceInfo": { + "subject": "Anmeldung eines Gewerbes in Musterstadt", + "caseId": "DF/8923" }, - "docs": [ - { - "docId": "1", - "purpose": "form", - "size": 13046, - "mimeType": "application/pdf", - "filename": "test.pdf", - "description": "Das Antragsformular", - "lang": { - "lang": "de", - "region": "DE" - }, - "hash": { - "algorithm": "SHA-256", - "digest": "bf37d894fdf9aeade63975ed648d49c3e8a7a773923597d2418915f54cd7c3b9" + "contentStructure": { + "data": { + "schema": { + "mimeType": "json", + "schemaSource": "none" } - } - ] - }, - "publicServiceType": { - "name": "Gewerbeanmeldung", - "description": "Eine Gewerbeanmeldung ist immer dann notwendig, wenn Sie einen stehenden Gewerbebetrieb beginnen.", - "leikaId": "99050012104000", - "otherIdentifiers": [ - { - "id": "8664844", - "schemeId": "service.niedersachsen.de", - "schemeName": "Serviceportal Niedersachsen" }, - { - "id": "354824", - "schemeId": "buerger.thueringen.de", - "schemeName": "Zuständigkeitsfinder Thüringen" - } - ] - }, - "applicants": [ - { - "type": "person", - "authentificationInfo": { - "assuranceLevel": "high", - "authentificationMethod": "eID", - "timestamp": "2020-03-03T12:38:23Z" - }, - "identityInfo": { - "dateOfBirth": "1970-09-13", - "gender": "m", - "givenName": "WERNER", - "familyName": "MUSTERMANN", - "placeOfResidence": { - "type": "national", - "street": "KURZER WEG 7", - "postalCode": "12345", - "city": "ANKH-MORPORK" - } - }, - "contactInfo": { - "electronicAddresses": [ - { - "channelType": "Service-Account-Mailbox", - "address": "3b0c9c8c-0801-45f0-a331-2abfc9db78d0" + "docs": [ + { + "docId": "1", + "purpose": "form", + "size": 13046, + "mimeType": "application/pdf", + "filename": "test.pdf", + "description": "Das Antragsformular", + "lang": { + "lang": "de", + "region": "DE" + }, + "hash": { + "algorithm": "SHA-256", + "digest": "bf37d894fdf9aeade63975ed648d49c3e8a7a773923597d2418915f54cd7c3b9" } - ], - "physicalAddress": { - "type": "national", - "street": "Kurzer Weg", - "houseNumber": "7", - "postalCode": "12345", - "city": "Ankh-Morpork" + } + ] + }, + "publicServiceType": { + "name": "Gewerbeanmeldung", + "description": "Eine Gewerbeanmeldung ist immer dann notwendig, wenn Sie einen stehenden Gewerbebetrieb beginnen.", + "leikaId": "99050012104000", + "otherIdentifiers": [ + { + "id": "8664844", + "schemeId": "service.niedersachsen.de", + "schemeName": "Serviceportal Niedersachsen" }, - "telephones": [ - { - "number": "+49 89 32168-42", - "mobile": true, - "description": "work" + { + "id": "354824", + "schemeId": "buerger.thueringen.de", + "schemeName": "Zuständigkeitsfinder Thüringen" + } + ] + }, + "applicants": [ + { + "type": "person", + "authentificationInfo": { + "assuranceLevel": "high", + "authentificationMethod": "eID", + "timestamp": "2020-03-03T12:38:23Z" + }, + "identityInfo": { + "dateOfBirth": "1970-09-13", + "gender": "m", + "givenName": "WERNER", + "familyName": "MUSTERMANN", + "placeOfResidence": { + "type": "national", + "street": "KURZER WEG 7", + "postalCode": "12345", + "city": "ANKH-MORPORK" } - ] + }, + "contactInfo": { + "electronicAddresses": [ + { + "channelType": "Service-Account-Mailbox", + "address": "3b0c9c8c-0801-45f0-a331-2abfc9db78d0" + } + ], + "physicalAddress": { + "type": "national", + "street": "Kurzer Weg", + "houseNumber": "7", + "postalCode": "12345", + "city": "Ankh-Morpork" + }, + "telephones": [ + { + "number": "+49 89 32168-42", + "mobile": true, + "description": "work" + } + ] + } } - } - ], - "paymentInfo": { - "reference": "TP/93/GDP", - "usage": "Gewerbeanmeldung", - "amount": 17.3, - "timestamp": "2020-03-03T12:38:23Z", - "status": "success", - "transaction": "1f77c5f9b759db9cdce59988b24974d465c7be5e462a6185485559ff6e2dea82" - }, - "applicationId": "0c508e3f-2353-4206-9a1e-34b2e864d5a8" - } - ] + ], + "paymentInfo": { + "reference": "TP/93/GDP", + "usage": "Gewerbeanmeldung", + "amount": 17.3, + "timestamp": "2020-03-03T12:38:23Z", + "status": "success", + "transaction": "1f77c5f9b759db9cdce59988b24974d465c7be5e462a6185485559ff6e2dea82" + }, + "applicationId": "0c508e3f-2353-4206-9a1e-34b2e864d5a8" + } + ] + } } } } @@ -1243,7 +1259,7 @@ { "mimeType": "json", "schemaSource": "none", - "encoding": "plain" + "encoding": "plain" } ], "callback": { -- GitLab