From 171ead86b0f0dcfad5cfbeef95565829d9107cf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Tue, 3 Oct 2023 14:18:53 +0200
Subject: [PATCH] ExerciseResultFile => All field are optional & Add container
 exit code information

---
 helpers/Dojo/SharedExerciseHelper.ts | 8 +++++---
 types/Dojo/ExerciseResultsFile.ts    | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/helpers/Dojo/SharedExerciseHelper.ts b/helpers/Dojo/SharedExerciseHelper.ts
index 13672a8..6f81054 100644
--- a/helpers/Dojo/SharedExerciseHelper.ts
+++ b/helpers/Dojo/SharedExerciseHelper.ts
@@ -9,10 +9,12 @@ class SharedExerciseHelper {
         const ajv = new Ajv();
 
         const schema: JTDSchemaType<ExerciseResultsFile> = {
-            properties          : {
-                success: { type: 'boolean' }
-            },
+            properties          : {},
             optionalProperties  : {
+                success: { type: 'boolean' },
+
+                containerExitCode: { type: 'uint32' },
+
                 successfulTests: { type: 'uint32' },
                 failedTests    : { type: 'uint32' },
 
diff --git a/types/Dojo/ExerciseResultsFile.ts b/types/Dojo/ExerciseResultsFile.ts
index 98bc83a..9cb95b7 100644
--- a/types/Dojo/ExerciseResultsFile.ts
+++ b/types/Dojo/ExerciseResultsFile.ts
@@ -1,5 +1,7 @@
 interface ExerciseResultsFile {
-    success: boolean;
+    success?: boolean;
+
+    containerExitCode?: number;
 
     successfulTests?: number;
     failedTests?: number;
-- 
GitLab