Skip to content

INJECT patterns

Exercise editor feature

An INJECT pattern is a partial definition that allows you to reuse a part of a definition across multiple exercises.

Differences from definition YAML

Most fields are the same, with the following exceptions:

milestones.yml

One of the milestones must include the starting property so the Exercise Builder knows where to insert the pattern.

  • starting: boolean, required - Must be set to true.

config.yml

This file contains information about the pattern.

  • name: string, required
  • description: string, default="" - Description of the pattern
  • target_audience: string, default="" - Target audience of the pattern
  • prerequisites: list of strings, default=empty - List of prerequisites for the definition
  • goals: list of strings, default=empty - List of goals
  • authors: list of strings, default=empty - List of authors
  • version: string, required - Semver version string of the format this pattern uses, see versioning for details

Available INJECT patterns

The INJECT team has prepared example patterns to make the exercise creation process easier. To use the prepared patterns, click the plus icon after an inject in the Exercise Builder and select from the list.