Skip to content

Commit 24881b8

Browse files
ErikSchierboomee7
andauthored
Document key for exercise files (#407)
Document key for exercise iles Co-authored-by: ee7 <[email protected]>
1 parent e3a0faa commit 24881b8

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

building/configlet/lint.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ The `config.json` file should have the following checks:
249249
- The `"forked_from"` values must not have duplicates
250250
- The `"language_versions"` key is optional
251251
- The `"language_versions"` value must be a string
252+
- The `"representer.version"` key is optional
253+
- The `"representer.version"` value must be an integer >= 1
252254
- The `"icon"` key is optional
253255
- The `"icon"` value must be a kebab-case string²
254256

@@ -321,6 +323,8 @@ The `config.json` file should have the following checks:
321323
- The `"language_versions"` value must be a string
322324
- The `"test_runner"` key is optional
323325
- The `"test_runner"` value must be a boolean
326+
- The `"representer.version"` key is optional
327+
- The `"representer.version"` value must be an integer >= 1
324328

325329
### Rule: exercises/{concept|practice}/&lt;slug&gt;/.approaches/config.json is valid
326330

building/tracks/concept-exercises.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ This file contains meta information on the exercise:
325325
- `blurb`: A short description of this exercise. Its length must be <= 350. Markdown is _not_ supported (required)
326326
- `source`: The source this exercise is based on (optional)
327327
- `source_url`: The URL of the source this exercise is based on (optional)
328+
- `representer`: Meta information related to how the representer processes this file (optional)
329+
- `version`: An integer for the version of the representer to use for the exercise (required if parent key is present)
328330
- `icon`: The slug of the icon (see [the full list of icons][exercise-icons]). If not specified, the exercise's slug will be used (optional)
329331

330332
If someone is both an author _and_ a contributor, only list that person as an author.
@@ -362,6 +364,9 @@ Assume that the user `FSharpForever` has written an exercise called `log-levels`
362364
"blurb": "Learn how to work with strings by processing log lines.",
363365
"source": "Wikipedia",
364366
"source_url": "https://en.wikipedia.org/wiki/Log_file",
367+
"representer": {
368+
"version": 2
369+
},
365370
"icon": "logs"
366371
}
367372
```

building/tracks/practice-exercises.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ This file contains meta information on the exercise:
287287
- `source`: The source this exercise is based on (optional)
288288
- `source_url`: The URL of the source this exercise is based on (optional)
289289
- `test_runner`: Indicates if solutions of this exercise should be tested in the test runner. Defaults to `true` if not specified. (optional)
290+
- `representer`: Meta information related to how the representer processes this file (optional)
291+
- `version`: An integer for the version of the representer to use for the exercise (required if parent key is present)
290292
- `icon`: The slug of the icon (see [the full list of icons][exercise-icons]). If not specified, the exercise's slug will be used (optional)
291293

292294
If someone is both an author _and_ a contributor, only list that person as an author.

0 commit comments

Comments
 (0)