From b198b3baff582f0a404f8887827ed5eb1c213e4f Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 5 Mar 2023 07:53:23 -0600 Subject: [PATCH] fix(api): attempt to validate extra translation strings --- api/schemas/extras.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/schemas/extras.yaml b/api/schemas/extras.yaml index 97844441..8bee08d7 100644 --- a/api/schemas/extras.yaml +++ b/api/schemas/extras.yaml @@ -82,6 +82,15 @@ $defs: source: type: string + translation: + type: object + additionalProperties: False + patternProperties: + "(\\w|\\.|-)+": + oneOf: + - type: string + - $ref: "#/$defs/translation" + type: object additionalProperties: False properties: @@ -111,4 +120,7 @@ properties: - $ref: "#/$defs/source_model" strings: type: object - # /\w{2}/: translation: {} \ No newline at end of file + additionalProperties: False + patternProperties: + "^\\w\\w$": + $ref: "#/$defs/translation" \ No newline at end of file