{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acceldata/json-schema/acceldata-update-sql-view-request-schema.json",
  "title": "io.ad.catalog.api.model.UpdateSqlViewRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acceldata-custom-assets-api-openapi.yml#/components/schemas/UpdateSqlViewRequest",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/UpdateSqlView"
    }
  },
  "$defs": {
    "SqlViewColumn": {
      "type": "object",
      "title": "io.ad.catalog.api.model.SqlViewColumn",
      "required": [
        "name",
        "nullable",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "nullable": {
          "type": "boolean"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "SqlViewDetails": {
      "type": "object",
      "title": "io.ad.catalog.api.model.SqlViewDetails",
      "required": [
        "description",
        "query",
        "queryType"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "query": {
          "type": "string"
        },
        "queryType": {
          "type": "string",
          "enum": [
            "SQL_QUERY",
            "FILTER",
            "AGGREGATION_PIPELINE"
          ]
        },
        "tableAlias": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "UpdateSqlView": {
      "type": "object",
      "title": "io.ad.catalog.api.model.UpdateSqlView",
      "required": [
        "details",
        "schema"
      ],
      "properties": {
        "details": {
          "$ref": "#/$defs/SqlViewDetails"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SqlViewColumn"
          }
        }
      }
    }
  }
}