From 100736b0e4f42d24ecc590da24f807e841b4d4d0 Mon Sep 17 00:00:00 2001
From: Andreas Huber <anh@fjd.de>
Date: Wed, 20 May 2020 08:57:27 +0200
Subject: [PATCH] Bei den Metadaten und der Destination ohne ID
 `"additionalProperties": false` wieder entfernt.

---
 docs/Release Notes/Version_0.5.md      |   3 +-
 models/application/metadata-no-id.json | 125 ++++++++++++-------------
 models/destination-no-id.json          |   1 -
 3 files changed, 64 insertions(+), 65 deletions(-)

diff --git a/docs/Release Notes/Version_0.5.md b/docs/Release Notes/Version_0.5.md
index 07a5c5f5..b8f01c98 100644
--- a/docs/Release Notes/Version_0.5.md	
+++ b/docs/Release Notes/Version_0.5.md	
@@ -26,7 +26,8 @@ In der Dokumentation werden die Begriffe "Source" und "Sender" synonym verwendet
 > **Hinweis:** Dies wirkt sich auch auf die OAuth-Scopes aus. Der Scope `{senderId}:source:manage` wurde in `{senderId}:sender:manage` geändert.
 
 ### CR-5: Zusätzliche Properties verbieten
-Wo möglich wurde `"additionalProperties": false` gesetzt um weitere Properties zu verbieten.
+- Wo möglich wurde `"additionalProperties": false` gesetzt um weitere Properties zu verbieten.
+- Bei den Metadaten und der Destination ohne ID musste `"additionalProperties": false` wieder entfernt werden da sonst keine Ableitung mit `allOf` möglich ist.
 
 ## Dokumentation
 - Release Notes mit aufgenommen
diff --git a/models/application/metadata-no-id.json b/models/application/metadata-no-id.json
index 7e646c1d..fa493552 100644
--- a/models/application/metadata-no-id.json
+++ b/models/application/metadata-no-id.json
@@ -2,68 +2,6 @@
   "type": "object",
   "title": "Application Metadata without ID",
   "description": "Metadaten eines Antrags noch ohne ID, zum Anlegen eines neuen Antrags. Nach dem Zuweisen der `application-id` wird das Modell [Application Metadata](metadata.json) verwendet.",
-  "additionalProperties": false,
-  "properties": {
-    "applicants": {
-      "type": "array",
-      "items": {
-        "$ref": "./applicant.json"
-      }
-    },
-    "paymentInfo": {
-      "$ref": "./payment-info.json"
-    },
-    "publicServiceType": {
-      "$ref": "./public-service-type.json"
-    },
-    "contentStructure": {
-      "type": "object",
-      "required": [
-        "data",
-        "docs"
-      ],
-      "additionalProperties": false,
-      "properties": {
-        "data": {
-          "type": "object",
-          "required": [
-            "schema"
-          ],
-          "additionalProperties": false,
-          "properties": {
-            "size": {
-              "type": "integer",
-              "description": "Größe des Dokuments in Bytes"
-            },
-            "schema": {
-              "$ref": "./schema.json"
-            }
-          }
-        },
-        "docs": {
-          "type": "array",
-          "items": {
-            "$ref": "./document.json"
-          }
-        }
-      }
-    },
-    "additionalReferenceInfo": {
-      "type": "object",
-      "additionalProperties": false,
-      "properties": {
-        "subject": {
-          "type": "string"
-        },
-        "caseId": {
-          "type": "string"
-        }
-      }
-    }
-  },
-  "required": [
-    "contentStructure"
-  ],
   "x-examples": {
     "example-1": {
       "additionalReferenceInfo": {
@@ -165,5 +103,66 @@
         "transaction": "1f77c5f9b759db9cdce59988b24974d465c7be5e462a6185485559ff6e2dea82"
       }
     }
-  }
+  },
+  "properties": {
+    "applicants": {
+      "type": "array",
+      "items": {
+        "$ref": "./applicant.json"
+      }
+    },
+    "paymentInfo": {
+      "$ref": "./payment-info.json"
+    },
+    "publicServiceType": {
+      "$ref": "./public-service-type.json"
+    },
+    "contentStructure": {
+      "type": "object",
+      "additionalProperties": false,
+      "required": [
+        "data",
+        "docs"
+      ],
+      "properties": {
+        "data": {
+          "type": "object",
+          "additionalProperties": false,
+          "required": [
+            "schema"
+          ],
+          "properties": {
+            "size": {
+              "type": "integer",
+              "description": "Größe des Dokuments in Bytes"
+            },
+            "schema": {
+              "$ref": "./schema.json"
+            }
+          }
+        },
+        "docs": {
+          "type": "array",
+          "items": {
+            "$ref": "./document.json"
+          }
+        }
+      }
+    },
+    "additionalReferenceInfo": {
+      "type": "object",
+      "additionalProperties": false,
+      "properties": {
+        "subject": {
+          "type": "string"
+        },
+        "caseId": {
+          "type": "string"
+        }
+      }
+    }
+  },
+  "required": [
+    "contentStructure"
+  ]
 }
\ No newline at end of file
diff --git a/models/destination-no-id.json b/models/destination-no-id.json
index 7871291d..fe6f9d78 100644
--- a/models/destination-no-id.json
+++ b/models/destination-no-id.json
@@ -2,7 +2,6 @@
   "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.",
-  "additionalProperties": false,
   "properties": {
     "publicOrganization": {
       "type": "object",
-- 
GitLab