{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-create-artifactory-payload-schema.json",
  "title": "CreateArtifactoryPayload",
  "description": "CreateArtifactory request data.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-registry-openapi.yml#/components/schemas/CreateArtifactoryPayload",
  "properties": {
    "name": {
      "description": "A user chosen name to distinguish multiple STACKIT Artifactories.\n",
      "maxLength": 255,
      "minLength": 5,
      "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$",
      "type": "string"
    },
    "proxy": {
      "allOf": [
        {
          "$ref": "#/$defs/CreateProxyRequest"
        }
      ],
      "description": "If proxy configuration is provided, this project will be created as\na proxy-cache for the upstream registry.\n"
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "$defs": {
    "CreateProxyRequest": {
      "description": "Provide an upstream repository this project is a proxy for",
      "properties": {
        "credentials": {
          "$ref": "#/$defs/Credentials"
        },
        "description": {
          "description": "Description of the registry.",
          "type": "string"
        },
        "registry_type": {
          "description": "Which replication adapter to use for this registry. Discover the\nlist of supported replication adapters, and therefore supported\nregistry types, by calling GET /v1/projects/{projectId}/regions/{regionId}/replication/adapters\n",
          "type": "string"
        },
        "url": {
          "description": "Upstream registry url to proxy",
          "type": "string"
        }
      },
      "required": [
        "registry_type",
        "url"
      ],
      "type": "object"
    },
    "Credentials": {
      "description": "Credentials for upstream registry",
      "properties": {
        "access_key": {
          "type": "string"
        },
        "access_secret": {
          "type": "string"
        }
      },
      "required": [
        "access_key",
        "access_secret"
      ],
      "type": "object"
    }
  }
}