{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/units.rf.dbm_watts/1.3.1/input.json",
  "title": "dBm to Watts — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "dbm-w",
        "w-dbm",
        "dbm-mw",
        "mw-dbm"
      ],
      "default": "dbm-w"
    },
    "value": {
      "type": "number"
    }
  },
  "required": [
    "value"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "w-dbm"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "properties": {
          "value": {
            "exclusiveMinimum": 0
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "const": "mw-dbm"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "properties": {
          "value": {
            "exclusiveMinimum": 0
          }
        }
      }
    }
  ],
  "description": "Convert dBm ↔ watts / milliwatts using log power ratios. (calculation_version 1.3.1)"
}
