{
  "$id": "plan.update",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "minProperties": 2,
  "properties": {
    "id": {
      "$ref": "common#/definitions/planId"
    },
    "alias": {
      "type": "string",
      "minLength": 1,
      "not": {
        "const": "free"
      }
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "hidden": {
      "type": "boolean"
    },
    "subscriptions": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "monthly": {
          "$ref": "plan.update#/definitions/subscription"
        },
        "yearly": {
          "$ref": "plan.update#/definitions/subscription"
        }
      }
    },
    "meta": {
      "$ref": "plan#/definitions/meta"
    },
    "level": {
      "$ref": "plan#/definitions/level"
    }
  },
  "definitions": {
    "subscription": {
      "title": "Subscription",
      "additionalProperties": false,
      "type": "object",
      "minProperties": 1,
      "properties": {
        "models": {
          "type": "integer",
          "minimum": 0
        },
        "modelPrice": {
          "type": "number",
          "minimum": 0.01
        }
      }
    }
  }
}
