{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/componecat-ai/json-schema/componecat-ai-create-catalog-entity-request-schema.json",
  "title": "CreateCatalogEntityRequest",
  "description": "Create catalog entity request body.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/componecat-ai-openapi.yml#/components/schemas/CreateCatalogEntityRequest",
  "required": [
    "displayName",
    "kindId",
    "ownerId",
    "lifecycle",
    "description"
  ],
  "type": "object",
  "properties": {
    "displayName": {
      "type": "string",
      "description": "Human-readable name (1–250 characters)."
    },
    "kindId": {
      "type": "string",
      "description": "ID of the entity kind definition (see `/entity-kind-definitions`).",
      "format": "uuid"
    },
    "ownerId": {
      "type": "string",
      "description": "ID of the owning team (see `/teams`).",
      "format": "uuid"
    },
    "lifecycle": {
      "enum": [
        "EXPERIMENTAL",
        "DEVELOPMENT",
        "PRODUCTION",
        "DEPRECATED",
        "RETIRED"
      ],
      "type": "string",
      "description": "Lifecycle stage."
    },
    "description": {
      "type": "string",
      "description": "Human-readable description (1–500 characters)."
    },
    "name": {
      "type": [
        "null",
        "string"
      ],
      "description": "URL-safe identifier (lowercase slug, max 250 characters). Generated from `displayName` when omitted. Must be unique per kind + namespace."
    },
    "namespace": {
      "type": [
        "null",
        "string"
      ],
      "description": "Optional namespace: lowercase alphanumeric with hyphens, not starting or ending with a hyphen, max 100 characters."
    },
    "tags": {
      "type": [
        "null",
        "array"
      ],
      "items": {
        "type": "string"
      },
      "description": "Free-form tags for categorization."
    },
    "repository": {
      "type": [
        "null",
        "string"
      ],
      "description": "Source repository URL (HTTPS GitHub, GitLab or Bitbucket, including owner and repository). Only accepted for kinds with repositories enabled (`hasRepository` on the kind definition); any other kind rejects it with `422`."
    },
    "fieldValues": {
      "type": [
        "null",
        "object"
      ],
      "additionalProperties": {},
      "description": "Kind-specific custom field values, as a JSON object keyed by each field definition's `key` (not an array). Send every value in its native JSON type matching the field's type: string (Text, Date, Url, Select, User, Team), number (Number), boolean (Boolean), array of strings (MultiSelect, Tag), or any JSON value (Json). Keys must resolve to field definitions assigned to the entity's kind; unknown keys are rejected."
    }
  }
}