{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openinvoke.com/service-card.schema.json",
  "title": "OpenInvoke Published Service Card Wrapper",
  "description": "Schema for /services/<service-id>.json. The inner service object is validated by /service.schema.json.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema_version",
    "marketplace",
    "generated_at",
    "canonical_id",
    "service_card_schema",
    "service_schema",
    "links",
    "agent_reading_order",
    "service"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "marketplace": {
      "type": "string"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "service_card_schema": {
      "const": "/service-card.schema.json"
    },
    "service_schema": {
      "const": "/service.schema.json"
    },
    "taxonomy": {
      "const": "/taxonomy.json"
    },
    "canonical_id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "links": {
      "type": "object"
    },
    "agent_reading_order": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "service": {
      "$ref": "/service.schema.json"
    }
  }
}
