{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/odata/json-schema/odata-service-document-schema.json",
  "title": "ServiceDocument",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/odata-odata-service-api-api-openapi.yml#/components/schemas/ServiceDocument",
  "type": "object",
  "required": [
    "@odata.context",
    "value"
  ],
  "properties": {
    "@odata.context": {
      "type": "string",
      "description": "Context URL pointing to the metadata document"
    },
    "value": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceDocumentItem"
      }
    }
  },
  "$defs": {
    "ServiceDocumentItem": {
      "type": "object",
      "required": [
        "name",
        "url"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the entity set, singleton, or function import"
        },
        "kind": {
          "type": "string",
          "enum": [
            "EntitySet",
            "Singleton",
            "FunctionImport",
            "ServiceDocument"
          ],
          "description": "Kind of resource"
        },
        "url": {
          "type": "string",
          "description": "URL relative to the service root"
        }
      }
    }
  }
}