{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/convert-online/json-schema/convert-online-option-list-schema.json",
  "title": "OptionList",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/convert-online-openapi.yml#/components/schemas/OptionList",
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "input_format": {
      "type": "string"
    },
    "output_format": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "options": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ConversionOption"
      }
    }
  },
  "$defs": {
    "ConversionOption": {
      "type": "object",
      "description": "One setting this conversion accepts. `name` is the key to use in a convert task's `options` object.",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "`checkbox` takes true/false, `number` takes an integer, `select` and `radio` take one of `values`."
        },
        "label": {
          "type": "string",
          "description": "What the website calls it."
        },
        "description": {
          "type": "string"
        },
        "group": {
          "type": "string",
          "description": "The panel it is grouped under."
        },
        "min": {
          "type": "integer"
        },
        "max": {
          "type": "integer"
        },
        "step": {
          "type": "integer"
        },
        "default": {
          "description": "The value used when the option is not given.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "values": {
          "type": "array",
          "description": "The allowed values, for `select` and `radio`. An entry is a bare value, or an object when its label differs from the value we need back.",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "applies_when": {
          "type": "object",
          "description": "Only honoured when the named option has the given value, e.g. `{\"video_codec\": \"h264\"}`.",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "name",
        "type"
      ]
    }
  }
}