{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Link Components",
  "description": "Create a link between two components in a project's blueprint. Links connect an output field on the source component to an input field on the destination component, establishing data flow between infrastructure resources.",
  "type": "object",
  "required": ["fromComponentId", "fromVersion", "fromField", "toComponentId", "toVersion", "toField"],
  "properties": {
    "fromComponentId": {
      "type": "string",
      "x-gql-type": "id",
      "title": "Source Component ID",
      "description": "ID of the component that produces the resource (e.g., 'myproj-database').",
      "examples": ["myproj-database", "myproj-cache"]
    },
    "fromVersion": {
      "type": "string",
      "x-gql-type": "version_constraint",
      "title": "Source Version Constraint",
      "description": "Version constraint for the source component (e.g., '~1.0', '1.2.3', 'latest')",
      "examples": ["~1.0", "1.2.3", "latest"]
    },
    "fromField": {
      "type": "string",
      "title": "Source Output Field",
      "description": "Output field name on the source component",
      "examples": ["authentication", "endpoint"]
    },
    "toComponentId": {
      "type": "string",
      "x-gql-type": "id",
      "title": "Destination Component ID",
      "description": "ID of the component that consumes the resource (e.g., 'myproj-app').",
      "examples": ["myproj-app", "myproj-worker"]
    },
    "toVersion": {
      "type": "string",
      "x-gql-type": "version_constraint",
      "title": "Destination Version Constraint",
      "description": "Version constraint for the destination component (e.g., '~1.0', '1.2.3', 'latest')",
      "examples": ["~1.0", "1.2.3", "latest"]
    },
    "toField": {
      "type": "string",
      "title": "Destination Input Field",
      "description": "Input field name on the destination component",
      "examples": ["database", "cache"]
    }
  }
}
