From 57e94eb33fdfd530763497039208b715e7375e09 Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Tue, 25 Jun 2024 21:02:45 +0300 Subject: [PATCH] pkp/pkp-lib#10060 Added nullable validation to multilingual fields --- schemas/author.json | 5 ++++- schemas/publication.json | 2 +- schemas/submissionFile.json | 3 +++ schemas/user.json | 5 ++++- schemas/userGroup.json | 10 ++++++++-- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/schemas/author.json b/schemas/author.json index 5a06769f48c..447dc6891cc 100644 --- a/schemas/author.json +++ b/schemas/author.json @@ -28,7 +28,10 @@ "competingInterests": { "type": "string", "description": "A declaration of potential competing interests.", - "multilingual": "true" + "multilingual": "true", + "validation": [ + "nullable" + ] }, "country": { "type": "string", diff --git a/schemas/publication.json b/schemas/publication.json index ad3565d1209..525460c888e 100644 --- a/schemas/publication.json +++ b/schemas/publication.json @@ -344,4 +344,4 @@ ] } } -} \ No newline at end of file +} diff --git a/schemas/submissionFile.json b/schemas/submissionFile.json index 12c1fe4ce2b..b9f6b7f5685 100644 --- a/schemas/submissionFile.json +++ b/schemas/submissionFile.json @@ -167,6 +167,9 @@ "name": { "type": "string", "multilingual": true, + "validation": [ + "nullable" + ], "apiSummary": true }, "path": { diff --git a/schemas/user.json b/schemas/user.json index e22b3b7dc79..ebd6a06519f 100644 --- a/schemas/user.json +++ b/schemas/user.json @@ -117,7 +117,10 @@ }, "givenName": { "type": "string", - "multilingual": true + "multilingual": true, + "validation": [ + "nullable" + ] }, "gossip": { "type": "string", diff --git a/schemas/userGroup.json b/schemas/userGroup.json index fd2d25f1600..d44b8107918 100644 --- a/schemas/userGroup.json +++ b/schemas/userGroup.json @@ -6,13 +6,19 @@ "type": "string", "description": "The short name of the user group.", "apiSummary": true, - "multilingual": true + "multilingual": true, + "validation": [ + "nullable" + ] }, "name": { "type": "string", "description": "The name of the user group.", "apiSummary": true, - "multilingual": true + "multilingual": true, + "validation": [ + "nullable" + ] }, "id": { "type": "integer",