{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ivans/json-schema/ivans-paginated-risk-profile-read-only-with-analyzer-info-list-schema.json",
  "title": "PaginatedRiskProfileReadOnlyWithAnalyzerInfoList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ivans-risk-profiles-api-openapi.yml#/components/schemas/PaginatedRiskProfileReadOnlyWithAnalyzerInfoList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RiskProfileReadOnlyWithAnalyzerInfo"
      }
    }
  },
  "$defs": {
    "LineOfBusiness": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "maxLength": 128
        },
        "code": {
          "type": "string",
          "maxLength": 32
        }
      },
      "required": [
        "code",
        "name",
        "uuid"
      ]
    },
    "MarketSimple": {
      "type": "object",
      "description": "Serializes subset of read-only fields for Market.\n\nViewSet: RiskProfileViewSet\n\nEndpoint: GET /risk-profiles/",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "uuid"
      ]
    },
    "ProductReadOnly": {
      "type": "object",
      "description": "Serializes subset of read-only fields for Product.\n\nViewSet: RiskProfileViewSet\n\nEndpoint: GET /risk-profiles/",
      "properties": {
        "market": {
          "$ref": "#/$defs/MarketSimple"
        },
        "lineOfBusiness": {
          "$ref": "#/$defs/LineOfBusiness"
        }
      },
      "required": [
        "lineOfBusiness",
        "market"
      ]
    },
    "RiskProfileReadOnlyWithAnalyzerInfo": {
      "type": "object",
      "description": "Serializes read-only fields for risk profiles, including additional info (e.g. supported states, multi-location support).\n\nViewSet: RiskProfileViewSet\n\nEndpoint: GET /risk-profiles/",
      "properties": {
        "name": {
          "type": "string",
          "readOnly": true
        },
        "uuid": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "readOnly": true
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/TypeEnum"
            }
          ],
          "readOnly": true,
          "description": "Type of risk profile. Base represents a base question set with a line of business. Monoline represents a carrier question set with a product and route configuration. Package represents a carrier question set with a product, route configuration, and related risk profile children. Bundle represents a carrier question set with a market and related risk profile children."
        },
        "version": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true,
          "description": "Version number for a risk profile. A newly created risk profile's version is null, and will be set automatically when the risk profile is locked. The version number starts at 1 and increments by 1 based on existing risk profiles with matching market, line of business, product, route, and children."
        },
        "isAvailable": {
          "type": "boolean",
          "readOnly": true,
          "description": "Indicates whether the risk profile has no issues after testing and is available to quote from. Set this via admin action on the list page (subject to permission)."
        },
        "isLatest": {
          "type": "boolean",
          "readOnly": true,
          "description": "Indicates whether this risk profile is the latest version. For bookkeeping purposes only - not used for business logic.Set this via admin action on the list page (subject to permission)."
        },
        "lineOfBusiness": {
          "$ref": "#/$defs/LineOfBusiness"
        },
        "product": {
          "$ref": "#/$defs/ProductReadOnly"
        },
        "routeConfiguration": {
          "$ref": "#/$defs/RouteConfigurationReadOnly"
        },
        "supportedStates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        },
        "isMultiLocationSupported": {
          "type": "boolean",
          "readOnly": true
        }
      },
      "required": [
        "description",
        "isAvailable",
        "isLatest",
        "isMultiLocationSupported",
        "lineOfBusiness",
        "name",
        "product",
        "routeConfiguration",
        "supportedStates",
        "type",
        "uuid",
        "version"
      ]
    },
    "RouteConfigurationReadOnly": {
      "type": "object",
      "description": "Serializes subset of read-only fields for RouteConfiguration.\n\nViewSet: RiskProfileViewSet\n\nEndpoint: GET /risk-profiles/",
      "properties": {
        "description": {
          "type": "string",
          "readOnly": true
        },
        "routeType": {
          "type": "string"
        }
      },
      "required": [
        "description",
        "routeType"
      ]
    },
    "TypeEnum": {
      "enum": [
        "Base",
        "Monoline",
        "Package",
        "Bundle"
      ],
      "type": "string"
    }
  }
}