{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stat-fi/json-schema/stat-fi-data-base-listing-item-schema.json",
  "title": "DataBaseListingItem",
  "description": "Represents a database entry in the database listing endpoint.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stat-fi-pxapi-beta-openapi.yml#/components/schemas/DataBaseListingItem",
  "required": [
    "availableLanguages",
    "id",
    "links",
    "name",
    "tableCount"
  ],
  "type": "object",
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string",
      "description": "Unique identifier of the database."
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Localized database name resolved for the requested language."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Localized database description resolved for the requested language; null if not available."
    },
    "tableCount": {
      "type": "integer",
      "description": "Number of tables available in the database.",
      "format": "int32"
    },
    "availableLanguages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Languages available for this database (intersection of translated name languages and globally supported languages)."
    },
    "links": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      },
      "description": "HATEOAS links related to the database (e.g., tables listing endpoint)."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Link": {
      "required": [
        "href",
        "method",
        "rel"
      ],
      "type": "object",
      "properties": {
        "href": {
          "minLength": 1,
          "type": "string",
          "description": "Absolute or relative URI of the target resource."
        },
        "rel": {
          "minLength": 1,
          "type": "string",
          "description": "Relation type describing how the target resource relates to the current resource (e.g., self, data, metadata)."
        },
        "method": {
          "minLength": 1,
          "type": "string",
          "description": "HTTP method to use when following the link (e.g., GET, POST)."
        }
      },
      "additionalProperties": false,
      "description": "Represents a link to a related resource (HATEOAS)."
    }
  }
}