{
  "id": "plan.create",
  "type": "object",
  "required": ["data"],
  "properties": {
    "data": {
      "type": "object",
      "required": ["type", "attributes"],
      "properties": {
        "type": { "type": "string", "constant": "plan" },
        "attributes": {
          "type": "object",
          "required": ["name", "alias", "subscriptions"],
          "properties": {
            "hidden": { "type": "boolean" },
            "alias": { "type": "string", "minLength": 1 },
            "name": { "type": "string", "minLength": 1 },
            "state": { "type": "string", "minLength": 1, "enum": ["active", "created"] },
            "description": { "type": "string" },
            "subscriptions": {
              "type": "object",
              "required": ["monthly", "yearly"],
              "properties": {
                "monthly": { "$ref": "common#/definitions/subscription" },
                "yearly": { "$ref": "common#/definitions/subscription" }
              }
            }
          }
        }
      }
    }
  }
}
