{
  "$id": "MatchTemplateInput.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "format": {
      "$ref": "MatchFormat.json"
    },
    "defaults": {
      "type": "object",
      "properties": {
        "fee": {
          "$ref": "Fee.json"
        }
      },
      "additionalProperties": false,
      "description": "Filled into a match made from this template, or from a competition that uses it, when the match has none. Not the user's role: that depends on the match."
    },
    "id": {
      "description": "The id from the URL; can be left out.",
      "$ref": "Id.json"
    },
    "version": {
      "description": "The version last seen, when updating. Leave it out to create the record.",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "name",
    "format",
    "defaults"
  ],
  "additionalProperties": false,
  "description": "A MatchTemplate as a client sends it to save it: the server sets updatedAt and deletedAt, and version only goes with an update."
}
