{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Create OCI Repository",
  "description": "Create a new OCI repository in your organization's catalog. Repositories must exist before any version can be published to them.",
  "type": "object",
  "required": ["id", "artifactType"],
  "properties": {
    "id": {
      "type": "string",
      "title": "Repository Name",
      "description": "Unique repository name within your organization, e.g. `aws-aurora-postgres`. Lowercase letters, numbers, dashes, underscores only. Max 53 characters. Cannot be changed after creation.",
      "minLength": 1,
      "maxLength": 53,
      "pattern": "^[a-z0-9-_]+$",
      "examples": ["aws-aurora-postgres", "kubernetes-cluster"]
    },
    "artifactType": {
      "type": "string",
      "title": "Artifact Type",
      "description": "OCI artifact type stored in this repository. Today only `BUNDLE` is accepted; additional types will be added as Massdriver expands the catalog.",
      "x-gql-type": "oci_artifact_type",
      "enum": ["BUNDLE"],
      "default": "BUNDLE"
    },
    "attributes": {
      "type": "object",
      "title": "Attributes",
      "description": "Key-value attributes for this repository. Used by ABAC policies for fine-grained access control. Reserved `md-*` keys are rejected. Must conform to the organization's custom attributes for the repo scope.",
      "additionalProperties": { "type": "string" },
      "default": {},
      "x-gql-type": "map"
    }
  }
}
