{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openjuvenile.org/schemas/v0.2/profiles/stroller.schema.json",
  "title": "Category profile – strollers",
  "description": "Fields for strollers, prams and buggies (category code stroller). Relevant standards: EN 1888-1 and EN 1888-2. A travel system sold as one product (frame, seat unit, carrycot or infant car seat) is one record; its components are listed in the core under contents.",
  "$comment": "TODO(review): the levels of the profile fields are a first proposal for the working group Strollers & car seats.",
  "type": "object",
  "properties": {
    "strollerType": {
      "description": "Type of stroller: full-size (for everyday use from birth, usually with a carrycot or a seat that lies flat) · compact (for everyday use, folds smaller than a full-size model) · travel (lightweight, designed to fold as small as possible) · buggy (lightweight, for babies who can sit and for toddlers) · jogger (for running, with large wheels and a lockable front wheel). The number and arrangement of seats is given in seatingLayout.",
      "type": "string",
      "enum": ["full-size", "compact", "travel", "buggy", "jogger"],
      "examples": ["travel"]
    },
    "seatingLayout": {
      "description": "Number and arrangement of seats: single · side-by-side (two seats next to each other) · tandem (two seats one behind the other).",
      "type": "string",
      "enum": ["single", "side-by-side", "tandem"],
      "examples": ["single"]
    },
    "foldedDimensions": {
      "$ref": "../core.schema.json#/$defs/dimensions",
      "description": "Dimensions when folded, in centimetres."
    },
    "foldType": {
      "description": "How the stroller folds: one-hand, two-hand, two-piece (seat removed before folding) or self-standing (stands on its own when folded).",
      "type": "string",
      "enum": ["one-hand", "two-hand", "two-piece", "self-standing"],
      "x-openjuvenile-level": "should",
      "examples": ["one-hand"]
    },
    "seat": {
      "description": "The seat unit and its limits.",
      "type": "object",
      "properties": {
        "maxChildWeightKg": {
          "description": "Maximum weight of the child in the seat, in kg, as stated by the manufacturer.",
          "type": "number",
          "exclusiveMinimum": 0,
          "examples": [22]
        },
        "fromBirth": {
          "description": "Whether the seat can be used from birth, for example because it reclines to a lying position.",
          "type": "boolean",
          "x-openjuvenile-level": "should",
          "examples": [true]
        },
        "minAgeMonths": {
          "description": "Minimum age of the child in the seat, in months, if the seat is not for use from birth.",
          "type": "integer",
          "minimum": 0,
          "x-openjuvenile-level": "conditional",
          "x-openjuvenile-condition": "fromBirth is false.",
          "examples": [6]
        },
        "facing": {
          "description": "Direction the seat faces: towards the parent, towards the world, or reversible.",
          "type": "string",
          "enum": ["parent", "world", "reversible"],
          "x-openjuvenile-level": "should",
          "examples": ["world"]
        },
        "reclinePositions": {
          "description": "Number of backrest positions.",
          "type": "integer",
          "minimum": 1,
          "x-openjuvenile-level": "should",
          "examples": [4]
        }
      },
      "required": ["maxChildWeightKg"],
      "additionalProperties": false
    },
    "carrycot": {
      "description": "The carrycot, if one is included or available for this frame.",
      "type": "object",
      "properties": {
        "included": {
          "description": "Whether the carrycot is included in the package. If it is sold separately, it is listed in the compatibility block.",
          "type": "boolean",
          "examples": [false]
        },
        "maxChildWeightKg": {
          "description": "Maximum weight of the child in the carrycot, in kg, as stated by the manufacturer.",
          "type": "number",
          "exclusiveMinimum": 0,
          "x-openjuvenile-level": "should",
          "examples": [9]
        }
      },
      "required": ["included"],
      "additionalProperties": false,
      "x-openjuvenile-level": "may"
    },
    "basketCapacityKg": {
      "description": "Maximum load of the shopping basket, in kg.",
      "type": "number",
      "exclusiveMinimum": 0,
      "x-openjuvenile-level": "should",
      "examples": [5]
    },
    "carSeatCompatible": {
      "description": "Whether an infant car seat can be mounted on the frame, directly or with an adapter. Which seats fit, and with which adapter, is listed in the compatibility block.",
      "type": "boolean",
      "x-openjuvenile-level": "should",
      "examples": [true]
    },
    "wheelType": {
      "description": "Type of tyres.",
      "$comment": "TODO(review): the list of wheel types is a first draft.",
      "type": "string",
      "enum": ["air", "foam-filled", "eva", "rubber", "plastic", "other"],
      "x-openjuvenile-level": "may",
      "examples": ["eva"]
    },
    "suspension": {
      "description": "Which wheels are suspended.",
      "type": "string",
      "enum": ["none", "front", "rear", "all-wheels"],
      "x-openjuvenile-level": "may",
      "examples": ["all-wheels"]
    }
  },
  "required": ["strollerType", "seatingLayout", "foldedDimensions", "seat"],
  "patternProperties": {
    "^x-": {
      "description": "Extension fields. Names start with x- and are ignored by consumers that do not know them."
    }
  },
  "additionalProperties": false,
  "allOf": [
    {
      "$comment": "A seat that is not for use from birth states its minimum age.",
      "if": {
        "properties": {
          "seat": {
            "properties": {
              "fromBirth": {
                "const": false
              }
            },
            "required": ["fromBirth"]
          }
        },
        "required": ["seat"]
      },
      "then": {
        "properties": {
          "seat": {
            "required": ["minAgeMonths"]
          }
        }
      }
    }
  ]
}
