{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/zywave/main/json-schema/zywave-feature-license-schema.json",
  "title": "FeatureLicense",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-licenses-v2-openapi.json#/components/schemas/FeatureLicense",
  "allOf": [
    {
      "$ref": "#/$defs/Feature"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "licenses": {
          "type": "array",
          "description": "All licenses that have granted the feature.",
          "items": {
            "$ref": "#/$defs/License"
          }
        }
      }
    }
  ],
  "$defs": {
    "Feature": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The feature description."
        },
        "id": {
          "type": "integer",
          "description": "The feature identifier.",
          "format": "int32"
        },
        "isEnabled": {
          "type": "boolean",
          "description": "Specifies whether the feature is enabled."
        },
        "key": {
          "type": "string",
          "description": "The unique feature key.",
          "format": "guid"
        },
        "name": {
          "type": "string",
          "description": "The feature name."
        },
        "tags": {
          "type": "array",
          "description": "All tags associated with the feature.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "License": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "endDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "The effective end time for the license.",
          "format": "date-time"
        },
        "id": {
          "type": "integer",
          "description": "The license identifier.",
          "format": "int32"
        },
        "name": {
          "type": "string",
          "description": "The license name."
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity supplied by the license, if applicable.",
          "format": "int32"
        },
        "startDateTime": {
          "type": "string",
          "description": "The effective start time for the license.",
          "format": "date-time"
        }
      }
    }
  }
}