diff --git a/models/common/address-international.json b/models/common/address-international.json index 69bd2b4c3ae537828ed35f409ab33594af378cf1..99a35939086b92fed10829cc20c39d956c1b2641 100644 --- a/models/common/address-international.json +++ b/models/common/address-international.json @@ -1,21 +1,8 @@ { - "title": "International Address", "type": "object", + "title": "International Address", "description": "Eine internationale Adresse, bestehend aus ein bis fünf Adresszeilen.", - "x-examples": { - "example-1": { - "lines": [ - "760 United Nations Plaza", - "Manhattan, New York City, New York 10017" - ] - }, - "example-2": { - "lines": [ - "Threadneedle Street", - "London EC2R 8AH" - ] - } - }, + "additionalProperties": false, "properties": { "lines": { "type": "array", @@ -29,7 +16,14 @@ }, "country": { "type": "string", - "description": "Staat" + "description": "Staat gemäß Codeliste [https://www.xrepository.de/details/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:staat](Codeliste Staat aus der Staats- und Gebietssystematik des Statistischen Bundesamtes)", + "minLength": 3, + "maxLength": 3, + "pattern": "^[0-9]{3}$" } - } + }, + "required": [ + "lines", + "country" + ] } \ No newline at end of file diff --git a/models/common/address-national.json b/models/common/address-national.json index a89ec43bb9c3be86e12483c7287be2a9da199a97..a5b1bf9fc3730aa848cd6c1bf07cdbd5c0d0fb1e 100644 --- a/models/common/address-national.json +++ b/models/common/address-national.json @@ -11,6 +11,7 @@ }, "oneOf": [ { + "additionalProperties": false, "properties": { "street": { "type": "string", @@ -24,6 +25,7 @@ ], "description": "Hausnummer", "maxLength": 9, + "pattern": "^[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?$", "minimum": 1 }, "house-number-suffix": { @@ -48,9 +50,15 @@ "type": "string", "description": "Adresszusatz" } - } + }, + "required": [ + "street", + "postal-code", + "city" + ] }, { + "additionalProperties": false, "properties": { "post-office-box": { "type": "string", @@ -68,7 +76,11 @@ "description": "Ort", "maxLength": 50 } - } + }, + "required": [ + "postal-code", + "city" + ] } ], "type": "object" diff --git a/models/common/phone.json b/models/common/phone.json index 5638af8e9ba6b27e1df057494986884b01e0fbbb..b9202f1b3be5edd09a355529474cf349dae38222 100644 --- a/models/common/phone.json +++ b/models/common/phone.json @@ -7,7 +7,7 @@ "number": { "type": "string", "title": "Phone Number", - "description": "Telefonnummer im internationalen Format, z.B. \"+49 89 32168-42\". Muss mit einem Plus beginnen und darf danach außer Ziffern nur Leerzeichen ( ) und Bindestriche (-) enthalten.", + "description": "Telefonnummer gemäß ITU E.123. Es soll das internationalen Format, z.B. \"+49 89 32168-42\" verwendet werden.", "example": "+49 89 32168-42", "maxLength": 23 },