Skip to content
Snippets Groups Projects
Commit fc9b2700 authored by Andreas Huber's avatar Andreas Huber
Browse files

CR-1: Discriminator hinzufügen

parent df2bf918
No related branches found
No related tags found
1 merge request!9Version 0.5
......@@ -8,10 +8,21 @@
{
"$ref": "../common/address-national.json"
},
{
"$ref": "../common/address-postbox.json"
},
{
"$ref": "../common/address-international.json"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"national": "../common/address-national.json",
"postbox": "../common/address-postbox.json",
"international": "../common/address-international.json"
}
},
"description": "Physikalische (Post-)Adresse"
},
"telephone": {
......
{
"title": "Applicant Organisation",
"type": "object",
"title": "Applicant Organisation",
"description": "Antragsteller in Form von einer Organisation, z.B. einem Unternehmen",
"additionalProperties": false,
"properties": {
"identifier": {
"type": "array",
......@@ -57,10 +58,21 @@
{
"$ref": "../common/address-national.json"
},
{
"$ref": "../common/address-postbox.json"
},
{
"$ref": "../common/address-international.json"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"national": "../common/address-national.json",
"postbox": "../common/address-postbox.json",
"international": "../common/address-international.json"
}
},
"description": "Offizielle Adresse"
},
"legalRepresentatives": {
......@@ -84,6 +96,15 @@
"required": [
"method"
]
},
"type": {
"type": "string",
"enum": [
"organization"
]
}
}
},
"required": [
"type"
]
}
\ No newline at end of file
{
"title": "Applicant Person",
"type": "object",
"title": "Applicant Person",
"description": "Antragstellerdaten für eine natürliche Person",
"additionalProperties": false,
"properties": {
"identifier": {
"type": "array",
......@@ -18,64 +19,15 @@
},
"contactInfo": {
"$ref": "./applicant-contact-info.json"
},
"type": {
"type": "string",
"enum": [
"person"
]
}
},
"x-examples": {
"example-1": {
"identifier": [
{
"id": "918",
"schemeName": "Antragsportal",
"schemeId": "urn:com:example:antragsportal:user"
}
],
"contactInfo": {
"physicalAddress": {
"street": "Kurzer Weg",
"houseNumber": 7,
"postalCode": "12345",
"city": "string",
"addressSupplement": "string"
},
"telephone": [
{
"number": "+49 89 32168-42",
"mobile": true,
"description": "string"
}
],
"electronicAddresses": [
{
"channelType": "Service-Account-Mailbox",
"address": "string"
}
]
},
"identityInfo": {
"gender": "m",
"nationality": "string",
"familyName": "string",
"givenName": "string",
"birthName": "string",
"doctoralDegrees": "string",
"artisticName": "string",
"dateOfBirth": "2020-04-16",
"placeOfBirth": "string",
"placeOfResidence": {
"street": "string",
"houseNumber": null,
"houseNumberSuffix": "st",
"postalCode": "strin",
"city": "string",
"addressSupplement": "string"
}
},
"authentificationInfo": {
"timestamp": "2020-04-16T06:50:39Z",
"authentificationToken": {},
"authentificationMethod": "string",
"assuranceLevel": "low"
}
}
}
"required": [
"type"
]
}
\ No newline at end of file
{
"title": "Applicant",
"description": "Ein Antragsteller, entweder eine Organisation oder eine natürliche Person",
"oneOf": [
{
"$ref": "./applicant-person.json"
......@@ -7,6 +9,11 @@
"$ref": "./applicant-organization.json"
}
],
"title": "Applicant",
"description": "Ein Antragsteller, entweder eine Organisation oder eine natürliche Person"
"discriminator": {
"propertyName": "type",
"mapping": {
"person": "./applicant-person.json",
"organization": "./applicant-organization.json"
}
}
}
\ No newline at end of file
......@@ -3,6 +3,22 @@
"title": "International Address",
"description": "Eine internationale Adresse, bestehend aus ein bis fünf Adresszeilen.",
"additionalProperties": false,
"x-examples": {
"example-1": {
"lines": [
"760 United Nations Plaza",
"Manhattan, New York City, New York 10017"
],
"country": "368"
},
"example-2": {
"lines": [
"Threadneedle Street",
"London EC2R 8AH"
],
"country": "168"
}
},
"properties": {
"lines": {
"type": "array",
......@@ -20,26 +36,17 @@
"minLength": 3,
"maxLength": 3,
"pattern": "^[0-9]{3}$"
},
"type": {
"type": "string",
"enum": [
"international"
]
}
},
"required": [
"lines",
"country"
],
"x-examples": {
"example-1": {
"lines": [
"760 United Nations Plaza",
"Manhattan, New York City, New York 10017"
],
"country": "368"
},
"example-2": {
"lines": [
"Threadneedle Street",
"London EC2R 8AH"
],
"country": "168"
}
}
"country",
"type"
]
}
\ No newline at end of file
......@@ -9,79 +9,57 @@
"city": "Ankh-Morpork"
}
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"street": {
"type": "string",
"description": "Straße",
"maxLength": 55
},
"houseNumber": {
"type": [
"string",
"integer"
],
"description": "Hausnummer",
"maxLength": 9,
"pattern": "^[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?$",
"minimum": 1
},
"houseNumberSuffix": {
"type": "string",
"description": "Hausnummerzusatz",
"maxLength": 2,
"pattern": "^[\\p{L}0-9. ]*$"
},
"postalCode": {
"type": "string",
"description": "Postleitzahl",
"minLength": 5,
"maxLength": 5,
"pattern": "^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$"
},
"city": {
"type": "string",
"description": "Ort",
"maxLength": 50
},
"addressSupplement": {
"type": "string",
"description": "Adresszusatz"
}
},
"required": [
"street",
"postalCode",
"city"
]
"type": "object",
"additionalProperties": false,
"properties": {
"street": {
"type": "string",
"description": "Straße",
"maxLength": 55
},
"houseNumber": {
"type": [
"string",
"integer"
],
"description": "Hausnummer",
"maxLength": 9,
"pattern": "^[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?$",
"minimum": 1
},
"houseNumberSuffix": {
"type": "string",
"description": "Hausnummerzusatz",
"maxLength": 2,
"pattern": "^[\\p{L}0-9. ]*$"
},
"postalCode": {
"type": "string",
"description": "Postleitzahl",
"minLength": 5,
"maxLength": 5,
"pattern": "^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$"
},
{
"additionalProperties": false,
"properties": {
"postOfficeBox": {
"type": "string",
"description": "Postfach"
},
"postalCode": {
"type": "string",
"description": "Postleitzahl",
"minLength": 5,
"maxLength": 5,
"pattern": "^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$"
},
"city": {
"type": "string",
"description": "Ort",
"maxLength": 50
}
},
"required": [
"postalCode",
"city"
"city": {
"type": "string",
"description": "Ort",
"maxLength": 50
},
"addressSupplement": {
"type": "string",
"description": "Adresszusatz"
},
"type": {
"type": "string",
"enum": [
"national"
]
}
],
"type": "object"
},
"required": [
"street",
"postalCode",
"city",
"type"
]
}
\ No newline at end of file
{
"title": "Postfach Address",
"description": "Eine Adresse eines Postfachs.",
"x-examples": {
"example-1": {
"street": "Kurzer Weg",
"houseNumber": 7,
"postalCode": "12345",
"city": "Ankh-Morpork"
}
},
"type": "object",
"additionalProperties": false,
"properties": {
"postOfficeBox": {
"type": "string",
"description": "Postfach"
},
"postalCode": {
"type": "string",
"description": "Postleitzahl",
"minLength": 5,
"maxLength": 5,
"pattern": "^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$"
},
"city": {
"type": "string",
"description": "Ort",
"maxLength": 50
},
"type": {
"type": "string",
"enum": [
"postbox"
]
}
},
"required": [
"postalCode",
"city",
"type"
]
}
\ No newline at end of file
......@@ -40,12 +40,23 @@
"description": "Adresse als Alternative (Choice) von nationaler und internationaler Adresse.",
"oneOf": [
{
"$ref": "../common/address-national.json"
"$ref": "./address-national.json"
},
{
"$ref": "../common/address-international.json"
"$ref": "./address-postbox.json"
},
{
"$ref": "./address-international.json"
}
]
],
"discriminator": {
"propertyName": "type",
"mapping": {
"national": "./address-national.json",
"postbox": "./address-postbox.json",
"international": "./address-international.json"
}
}
},
"identifiers": {
"type": "array",
......
......@@ -40,10 +40,21 @@
{
"$ref": "./common/address-national.json"
},
{
"$ref": "./common/address-postbox.json"
},
{
"$ref": "./common/address-international.json"
}
]
],
"discriminator": {
"propertyName": "type",
"mapping": {
"national": "./common/address-national.json",
"postbox": "./common/address-postbox.json",
"international": "./common/address-international.json"
}
}
},
"identifiers": {
"type": "array",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment