{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-synapse-analytics/json-schema/microsoft-azure-synapse-analytics-database-entity-schema.json",
  "title": "DatabaseEntity",
  "description": "Database entity.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-synapse-analytics-databases-api-openapi.yml#/components/schemas/DatabaseEntity",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/MDEntity"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/DatabaseProperties"
    }
  },
  "required": [
    "properties"
  ],
  "$defs": {
    "ArtifactType": {
      "description": "Artifact type.",
      "type": "string",
      "enum": [
        "DATABASE",
        "TABLE",
        "SCHEMA",
        "VIEW",
        "FUNCTION",
        "PARTITIONINFO",
        "RELATIONSHIP"
      ],
      "x-ms-enum": {
        "name": "SASEntityType",
        "modelAsString": false
      }
    },
    "DataSource": {
      "description": "Data source properties.",
      "type": "object",
      "properties": {
        "provider": {
          "description": "Data source provider information.",
          "type": "string"
        },
        "location": {
          "description": "Data source location.",
          "type": "string"
        },
        "properties": {
          "description": "Property bag.",
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      },
      "required": [
        "location"
      ]
    },
    "DatabaseProperties": {
      "description": "Database properties.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/MDEntityProperties"
        }
      ],
      "properties": {
        "source": {
          "$ref": "#/$defs/DataSource"
        },
        "description": {
          "description": "Description of the database.",
          "type": "string"
        }
      },
      "required": [
        "source"
      ]
    },
    "MDEntity": {
      "description": "MD Entity",
      "type": "object",
      "properties": {
        "name": {
          "description": "Entity Name.",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ArtifactType"
        },
        "id": {
          "description": "Entity Resource Id.",
          "type": "string",
          "readOnly": true
        },
        "properties": {
          "type": "object"
        }
      },
      "required": [
        "name",
        "type"
      ]
    },
    "MDEntityProperties": {
      "description": "Defines the artifact entity.",
      "type": "object",
      "properties": {
        "originObjectId": {
          "description": "Entity object id maintained by the caller.",
          "type": "string"
        },
        "objectId": {
          "description": "Entity object id maintained by SyMS.",
          "type": "string",
          "readOnly": true
        },
        "objectVersion": {
          "description": "Entity object version maintained by SyMS.",
          "type": "integer",
          "format": "int64",
          "readOnly": true
        },
        "publishStatus": {
          "$ref": "#/$defs/PublishStatus"
        },
        "properties": {
          "description": "Property bag",
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      }
    },
    "PublishStatus": {
      "description": "Publish status.",
      "type": "string",
      "enum": [
        "PUBLISHED"
      ],
      "x-ms-enum": {
        "name": "PublishStatus",
        "modelAsString": false
      }
    }
  }
}