{
  "type": "object",
  "title": "Destination without ID",
  "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": {
      "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",
          "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": "application/json",
          "schemaSource": "none"
        }
      ],
      "callback": {
        "callbackURI": "http://127.0.0.1:4010/voluptas"
      },
      "publicKeys": {
        "keys": [
          {
            "kty": "RSA",
            "alg": "PS512",
            "key_ops": ["wrapKey"],
            "kid": "d4d3bd67-420f-4b39-85d9-92dd800c57b5",
            "x5t": "……(Fingerprint)……",
            "x5c": [
                "……(base64 encoded root cert)……",
                "……(base64 encoded intermediate cert)……",
                "……(base64 encoded cert)……"
            ]
          },
          {
            "kty": "RSA",
            "key_ops": ["verify"],
            "alg": "PS512",
            "kid": "……(Key ID)……",
            "x5t": "……(Fingerprint)……",
            "x5c": [
                "……(base64 encoded root cert)……",
                "……(base64 encoded intermediate cert)……",
                "……(base64 encoded cert)……"
            ]
          }
        ]
      }
    }
  },
  "properties": {
    "publicOrganization": {
      "type": "object",
      "properties": {
        "organizationName": {
          "type": "string"
        },
        "address": {
          "description": "Adresse als Alternative (Choice) von nationaler und internationaler Adresse.",
          "oneOf": [
            {
              "$ref": "./common/address-national.json"
            },
            {
              "$ref": "./common/address-postbox.json"
            },
            {
              "$ref": "./common/address-international.json"
            }
          ],
          "discriminator": {
            "propertyName": "type",
            "mapping": {
              "national": "./common/address-national.json",
              "international": "./common/address-international.json",
              "postbox": "./common/address-postbox.json"
            }
          }
        },
        "identifiers": {
          "type": "array",
          "description": "Externe Identifikatoren der Person",
          "items": {
            "$ref": "./common/identifier.json"
          }
        },
        "contact": {
          "description": "Kontaktmöglichkeiten der Behörde",
          "type": "object",
          "properties": {
            "telephones": {
              "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"
            }
          }
        }
      }
    },
    "technicalContact": {
      "type": "array",
      "description": "Technischer Ansprechpartner",
      "items": {
        "$ref": "./common/individual.json"
      }
    },
    "schemas": {
      "type": "array",
      "description": "Zulässige Schemas, die zu diesem Ziel übertragen werden können. Sofern leer dürfen Anträge (Application) keinen Datensatz (ApplicationData) enthalten.",
      "items": {
        "$ref": "./application/schema.json"
      }
    },
    "callback": {
      "type": "object",
      "description": "Callback zur Benachrichtigung bei neuen Anträgen",
      "properties": {
        "callbackURI": {
          "type": "string",
          "description": "URL auf die der Callback als POST durchgeführt wird",
          "format": "uri"
        }
      },
      "required": [
        "callbackURI"
      ]
    },
    "publicKey": {
      "$ref": "./common/jwk.json"
    }
  }
}