diff --git a/models/application/applicant-organization.json b/models/application/applicant-organization.json index b649eafe7cfe334d8a844a12a450a59174bf3c50..ed951fba5cbd804b5ea93beccd21496a7285d5dd 100644 --- a/models/application/applicant-organization.json +++ b/models/application/applicant-organization.json @@ -62,7 +62,7 @@ "type": "array", "description": "Namen der Mitglieder des Vertretungsorgans oder der gesetzlichen Vertreter", "items": { - "$ref": "../person/individual.json" + "$ref": "../common/individual.json" } } } diff --git a/models/person/abstract-person.json b/models/common/individual.json similarity index 59% rename from models/person/abstract-person.json rename to models/common/individual.json index 9afd4b0ac7329f140ffc2dcacd605f44e3dc78d4..8bff8f18eda7863f7e06b5951f7183eb4b3f6b95 100644 --- a/models/person/abstract-person.json +++ b/models/common/individual.json @@ -1,8 +1,23 @@ { - "title": "Abstract Person", + "title": "Individual", "type": "object", - "description": "Abstrakte Klasse für natürliche Person (Individual) und Organisation (Organization)", "properties": { + "form-of-address": { + "type": "string", + "description": "Anrede der Person wie \"Herr\" oder \"Frau\"" + }, + "academic-title": { + "type": "string", + "description": "Titel der Person wie \"Dr.\" oder \"Prof.\"" + }, + "first-name": { + "type": "string", + "description": "Vorname der Person" + }, + "last-name": { + "type": "string", + "description": "Nachname der Person" + }, "address": { "description": "Adresse als Alternative (Choice) von nationaler und internationaler Adresse.", "oneOf": [ @@ -47,5 +62,23 @@ } } } + }, + "description": "Natürliche Person", + "x-examples": { + "example-1": { + "form-of-address": "Herr", + "academic-title": "Dr.", + "first-name": "Werner", + "last-name": "Mustermann", + "contact": { + "telephone": [ + { + "number": "+49 89 32168-42", + "mobile": false, + "type": "work" + } + ] + } + } } } \ No newline at end of file diff --git a/models/destination-no-id.json b/models/destination-no-id.json index 8cf61c3b5065c7ae2e55c38eadb7ffb74b28e9a5..17c9ba110f707763c4d51fbc8ab6515aec198d47 100644 --- a/models/destination-no-id.json +++ b/models/destination-no-id.json @@ -4,7 +4,7 @@ "description": "Daten eines technischen Übergabepunkts (Ziel der Übertragung - z.B. ein Fachverfahren) noch ohne ID, zum Anlegen eines neuen Übergabepunkts. Nach dem Zuweisen der `destination-id` wird das Modell [Destination](destination.json) verwendet.", "x-examples": { "example-1": { - "organization": { + "public-organization": { "organization-name": "Gewerbeamt Musterhausen" }, "technical-contact": [ @@ -28,14 +28,63 @@ } }, "properties": { - "organization": { - "$ref": "./person/public-organization.json" + "public-organization": { + "type": "object", + "properties": { + "organization-name": { + "type": ",string" + }, + "address": { + "description": "Adresse als Alternative (Choice) von nationaler und internationaler Adresse.", + "oneOf": [ + { + "$ref": "./common/address-national.json" + }, + { + "$ref": "./common/address-international.json" + } + ] + }, + "identifiers": { + "type": "array", + "description": "Externe Identifikatoren der Person", + "items": { + "$ref": "./common/identifier.json" + } + }, + "contact": { + "description": "Kontaktmöglichkeiten der Behörde", + "type": "object", + "properties": { + "telephone": { + "type": "array", + "description": "Liste der Telefonnummern, außer Fax", + "items": { + "$ref": "./common/phone.json" + } + }, + "email": { + "type": "string", + "format": "email", + "description": "E-Mail-Adresse" + }, + "www": { + "type": "string", + "format": "uri", + "description": "Webadresse" + }, + "telefax": { + "$ref": "./common/phone.json#/properties/number" + } + } + } + } }, "technical-contact": { "type": "array", "description": "Technischer Ansprechpartner", "items": { - "$ref": "./person/individual.json" + "$ref": "./common/individual.json" } }, "schemas": { diff --git a/models/person/individual.json b/models/person/individual.json deleted file mode 100644 index b00e49969d6ba49689b086def0b38c5b021e700b..0000000000000000000000000000000000000000 --- a/models/person/individual.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "title": "Individual", - "allOf": [ - { - "$ref": "./abstract-person.json" - }, - { - "type": "object", - "properties": { - "form-of-address": { - "type": "string", - "description": "Anrede der Person wie \"Herr\" oder \"Frau\"" - }, - "academic-title": { - "type": "string", - "description": "Titel der Person wie \"Dr.\" oder \"Prof.\"" - }, - "first-name": { - "type": "string", - "description": "Vorname der Person" - }, - "last-name": { - "type": "string", - "description": "Nachname der Person" - } - } - } - ], - "description": "Natürliche Person", - "x-examples": { - "example-1": { - "form-of-address": "Herr", - "academic-title": "Dr.", - "first-name": "Werner", - "last-name": "Mustermann", - "contact": { - "telephone": [ - { - "number": "+49 89 32168-42", - "mobile": false, - "type": "work" - } - ] - } - } - } -} \ No newline at end of file diff --git a/models/person/organization.json b/models/person/organization.json deleted file mode 100644 index fcfed3028283a78ff0025f122edb382527771742..0000000000000000000000000000000000000000 --- a/models/person/organization.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "title": "Organization", - "allOf": [ - { - "type": "object", - "properties": { - "organization-name": { - "type": "string", - "description": "Name der Organisation" - }, - "agents": { - "type": "array", - "description": "Ansprechpartner der Organisation", - "items": { - "$ref": "./individual.json" - } - } - }, - "required": [ - "organization-name" - ] - }, - { - "$ref": "./abstract-person.json" - } - ], - "description": "Eine Organisation, z.B. ein Unternehmen; für Behörden gibt es den Untertyp \"PublicOrganization\"" -} \ No newline at end of file diff --git a/models/person/public-organization.json b/models/person/public-organization.json deleted file mode 100644 index cd29085f1af2f7070ea23c947f142bfebc1b31e5..0000000000000000000000000000000000000000 --- a/models/person/public-organization.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "Public Organization", - "description": "Behörde", - "allOf": [ - { - "$ref": "./organization.json" - }, - { - "type": "object" - } - ] -} \ No newline at end of file