{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cosmicjs-com/json-schema/cosmicjs-com-object-type-update-schema.json",
  "title": "ObjectTypeUpdate",
  "description": "Only the properties sent are changed. Sending `metafields` replaces the entire array.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cosmicjs-com-openapi.yml#/components/schemas/ObjectTypeUpdate",
  "type": "object",
  "minProperties": 1,
  "properties": {
    "title": {
      "type": "string"
    },
    "singular": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "singleton": {
      "type": "boolean"
    },
    "emoji": {
      "type": "string"
    },
    "metafields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Metafield"
      }
    },
    "options": {
      "type": "object",
      "additionalProperties": true
    },
    "localization": {
      "type": "boolean"
    },
    "locales": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "priority_locale": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Metafield": {
      "type": "object",
      "description": "One field in an Object type's content model.",
      "required": [
        "title",
        "key",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Assigned by Cosmic. Omit when creating."
        },
        "title": {
          "type": "string",
          "description": "Label shown to editors in the dashboard."
        },
        "key": {
          "type": "string",
          "description": "The key used in an Object's `metadata`."
        },
        "type": {
          "type": "string",
          "description": "The Metafield type. See the Metafields documentation for the full list and the value shape each one expects."
        },
        "value": {
          "description": "Default value for the Metafield."
        },
        "helptext": {
          "type": "string",
          "description": "Guidance shown to editors beneath the field."
        },
        "required": {
          "type": "boolean",
          "description": "Whether Objects in this type must supply a value."
        },
        "media_validation_type": {
          "type": "string",
          "description": "Restricts uploads for File Metafields."
        },
        "repeater_fields": {
          "type": "array",
          "description": "Child Metafields, for `repeater` types.",
          "items": {
            "$ref": "#/$defs/Metafield"
          }
        },
        "options": {
          "type": "array",
          "description": "Choices for select, radio, and checkbox types.",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": true
    }
  }
}