Skip to content

Commit 07c15d1

Browse files
authored
Added schema placeholders for dynamic data (#2)
- #/definitions/files_list (for AutotestFile, referring to a script file uploaded by the instructor) - #/definitions/extra_group_data (for additional data inserted by MarkUs) - #/definitions/test_data_categories (for the category names inserted by MarkUs)
1 parent 4e8394a commit 07c15d1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

markus_autotesting_core/types/types.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ class BaseTestData(
8181
"""
8282

8383
category: Annotated[
84-
list[Annotated[str, Meta(extra_json_schema={"enum": [], "enumNames": []})]],
84+
list[
85+
Annotated[
86+
str,
87+
Meta(extra_json_schema={"$ref": "#/definitions/test_data_categories"}),
88+
]
89+
],
8590
Meta(title="Category", extra_json_schema={"uniqueItems": True}),
8691
]
8792

@@ -97,9 +102,13 @@ class BaseTestData(
97102
feedback_file_names: Annotated[list[str], Meta(title="Feedback files")]
98103
"""A list of file paths generated by executing this test group."""
99104

100-
extra_info: dict = {}
101-
"""TODO"""
105+
extra_info: Annotated[
106+
Any, Meta(extra_json_schema={"$ref": "#/definitions/extra_group_data"})
107+
] = {}
108+
"""Additional information for this test group."""
102109

103110

104-
AutotestFile = Annotated[str, Meta(extra_json_schema={"enum": []})]
111+
AutotestFile = Annotated[
112+
str, Meta(extra_json_schema={"$ref": "#/definitions/files_list"})
113+
]
105114
"""A placeholder in the JSON schema representing one of the files provided to the autotesting environment."""

0 commit comments

Comments
 (0)