{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "whp_name": {
        "type": "string",
        "minLength": 2
      },
      "whp_unit": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "whp_number": {
        "type": [
          "number"
        ],
        "description": "The WHP Parameter Number assigned by the WHPO, there is no requirement that all params have a number or for numbers to be unique to a single parameter."
      },
      "error_name": {
        "type": [
          "string"
        ]
      },
      "flag_w": {
        "enum": [
          "woce_bottle",
          "woce_ctd",
          "woce_discrete",
          null
        ]
      },
      "cf_name": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 3
      },
      "cf_unit": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1,
        "description": "Units to use if the actual unit in a CF-netcdf is different from the cf canonical unit, examples: degC instead of K for sea water temp or even umol/kg insead of mol/kg"
      },
      "reference_scale": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1,
        "description": "For some parameters, the calibration scale used e.g. ITS-90, IPTS-68, or unknown"
      },
      "data_type": {
        "enum": [
          "decimal",
          "integer",
          "string"
        ]
      },
      "numeric_min": {
        "type": [
          "number"
        ]
      },
      "numeric_max": {
        "type": [
          "number"
        ]
      },
      "numeric_precision": {
        "type": "integer",
        "minimum": 0
      },
      "field_width": {
        "type": "integer",
        "minimum": 1
      },
      "description": {
        "type": [
          "string",
          "null"
        ]
      },
      "note": {
        "type": [
          "string",
          "null"
        ]
      },
      "warning": {
        "type": [
          "string",
          "null"
        ]
      },
      "scope": {
        "enum": [
          "cruise",
          "profile",
          "sample"
        ]
      }
    },
    "required": [
      "whp_name",
      "whp_unit",
      "flag_w",
      "data_type",
      "field_width"
    ],
    "additionalProperties": false,
    "dependencies": {
      "numeric_min": {
        "properties": {
          "data_type": {
            "type": "string",
            "enum": [
              "decimal",
              "integer"
            ]
          }
        }
      },
      "numeric_max": {
        "properties": {
          "data_type": {
            "type": "string",
            "enum": [
              "decimal",
              "integer"
            ]
          }
        }
      },
      "numeric_precision": {
        "properties": {
          "data_type": {
            "type": "string",
            "enum": [
              "decimal",
              "integer"
            ]
          }
        }
      }
    }
  }
}