{
  "$defs": {
    "ComponentValueImportOptions": {
      "additionalProperties": false,
      "description": "An invocation's choice of which declared component value imports apply.",
      "properties": {
        "enabled": {
          "default": true,
          "description": "`false` applies none of the component's value imports. Defaults to `true`.",
          "type": "boolean"
        },
        "exclude": {
          "description": "Names of value imports to skip. Every name must be declared by the component.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ObjectMetadata": {
      "additionalProperties": false,
      "description": "Kubernetes object metadata",
      "properties": {
        "annotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Annotations",
          "type": "object"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Labels",
          "type": "object"
        },
        "name": {
          "description": "Resource name",
          "type": "string"
        },
        "namespace": {
          "description": "Namespace (optional)",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Expands a chart identified by a dynamic resource kind into Kubernetes manifests.\n\nThe kind is a local component path or remote chart shortcut, not the literal `Component`. The spec supplies chart values; the selected chart defines its input contract.\n\n## When needed\n\nUse this optional resource to invoke a chart through a local component kind or a remote chart shortcut.\n\n## If omitted\n\nCharts in component search paths are not rendered until invoked. A HelmChart can render a chart through explicit coordinates instead; authored Kubernetes manifests need no component invocation.",
  "examples": [
    {
      "apiVersion": "components.k8s.nyl/v1",
      "kind": "app/v1/WebService",
      "metadata": {
        "name": "workloads",
        "namespace": "workloads"
      },
      "spec": {
        "replicaCount": 2
      }
    }
  ],
  "properties": {
    "apiVersion": {
      "const": "components.k8s.nyl/v1",
      "description": "API group and version for chart-backed component invocations.",
      "type": "string"
    },
    "kind": {
      "description": "Relative path under `components/` that identifies the Helm chart",
      "type": "string"
    },
    "metadata": {
      "$ref": "#/$defs/ObjectMetadata",
      "description": "Helm release name, namespace, labels, and annotations."
    },
    "spec": {
      "default": {},
      "description": "Helm values — defaults to an empty object when omitted"
    },
    "valueImports": {
      "anyOf": [
        {
          "$ref": "#/$defs/ComponentValueImportOptions"
        },
        {
          "type": "null"
        }
      ],
      "description": "Opt this invocation out of the value imports its component declares.\n\nA local component may declare value imports in `nyl-component.yaml`, which supply chart value defaults from the effective Cluster and DeploymentTarget `values`. Imports are enabled unless this field turns them off; invocation `spec` values override imported defaults either way."
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata"
  ],
  "title": "Component",
  "type": "object"
}
