Skip to content
Snippets Groups Projects
Verified Commit 79d75a2b authored by Jonas Gröger's avatar Jonas Gröger :palm_tree:
Browse files

feat: split authentication tags since replies have required data field (unlike...

feat: split authentication tags since replies have required data field (unlike submissions) (planning#460)

and since attachment is now used in two places, extract it into a "part" for DRY reasons
parent 843e0853
No related branches found
No related tags found
1 merge request!14feat: split authentication tags since replies have required data field (unlike...
{
"title": "Authentication Tags (Reply)",
"description": "Authentication Tags des Meta- und Fachdatensatzes sowie der Anlagen eines Replies",
"type": "object",
"properties": {
"metadata": {
"$ref": "#/definitions/authenticationTag"
},
"data": {
"$ref": "#/definitions/authenticationTag"
},
"attachments": {
"$ref": "#/definitions/attachment"
}
},
"additionalProperties": false,
"required": [
"metadata",
"data"
],
"definitions": {
"authenticationTag": {
"$ref": "./parts/authentication-tag.schema.json"
},
"attachment": {
"$ref": "./parts/attachment.schema.json"
}
}
}
{ {
"title": "Authentication Tags", "title": "Authentication Tags (Submission)",
"description": "Authentication Tags des Meta- und Fachdatensatzes sowie der Anlagen", "description": "Authentication Tags des Meta- und Fachdatensatzes sowie der Anlagen einer Submission.",
"type": "object", "type": "object",
"properties": { "properties": {
"metadata": { "metadata": {
...@@ -10,13 +10,7 @@ ...@@ -10,13 +10,7 @@
"$ref": "#/definitions/authenticationTag" "$ref": "#/definitions/authenticationTag"
}, },
"attachments": { "attachments": {
"type": "object", "$ref": "#/definitions/attachment"
"patternProperties": {
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$": {
"$ref": "#/definitions/authenticationTag"
}
},
"additionalProperties": false
} }
}, },
"additionalProperties": false, "additionalProperties": false,
...@@ -26,6 +20,9 @@ ...@@ -26,6 +20,9 @@
"definitions": { "definitions": {
"authenticationTag": { "authenticationTag": {
"$ref": "./parts/authentication-tag.schema.json" "$ref": "./parts/authentication-tag.schema.json"
},
"attachment": {
"$ref": "./parts/attachment.schema.json"
} }
} }
} }
{
"title": "Attachment",
"type": "object",
"patternProperties": {
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$": {
"$ref": "./authentication-tag.schema.json"
}
},
"additionalProperties": false
}
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"authenticationTags": { "authenticationTags": {
"$ref": "#/$defs/authenticationTags" "$ref": "#/$defs/authenticationTagsSubmission"
} }
}, },
"required": [ "required": [
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"$ref": "#/$defs/problems" "$ref": "#/$defs/problems"
}, },
"authenticationTags": { "authenticationTags": {
"$ref": "#/$defs/authenticationTags" "$ref": "#/$defs/authenticationTagsSubmission"
} }
}, },
"required": [ "required": [
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"authenticationTags": { "authenticationTags": {
"$ref": "#/$defs/authenticationTags" "$ref": "#/$defs/authenticationTagsReply"
} }
}, },
"required": [ "required": [
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
"$ref": "#/$defs/problems" "$ref": "#/$defs/problems"
}, },
"authenticationTags": { "authenticationTags": {
"$ref": "#/$defs/authenticationTags" "$ref": "#/$defs/authenticationTagsReply"
} }
}, },
"required": [ "required": [
...@@ -186,11 +186,20 @@ ...@@ -186,11 +186,20 @@
"events" "events"
], ],
"$defs": { "$defs": {
"authenticationTags": { "authenticationTagsSubmission": {
"$ref": "./authentication-tags.schema.json" "$ref": "./authentication-tags-submission.schema.json"
},
"authenticationTagsReply": {
"$ref": "./authentication-tags-reply.schema.json"
}, },
"problems": { "problems": {
"$ref": "./problems.schema.json" "$ref": "./problems.schema.json"
},
"authenticationTag": {
"$ref": "./parts/authentication-tag.schema.json"
},
"attachment": {
"$ref": "./parts/attachment.schema.json"
} }
} }
} }
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