Skip to content

allOf + additionalProperties: false in asset schemas causes validation failures for official examples #275

@tcashelmgni

Description

@tcashelmgni

Description

The official sync-creatives request example at https://adcontextprotocol.org/schemas/2.5.0/media-buy/sync-creatives-request.json includes video assets like:

{
  "assets": {
    "video": {
      "url": "https://cdn.example.com/hero-video.mp4",
      "width": 1920,
      "height": 1080,
      "duration_ms": 30000
    }
  }
}

However, when validating this against the schema using Ajv (a popular JSON Schema validator), validation fails because:

  1. video-asset.json uses allOf combining dimensions.json with video-specific properties
  2. Both dimensions.json and the video properties object have additionalProperties: false
  3. In JSON Schema, allOf validates each sub-schema independently. The dimensions schema sees url/duration_ms as "additional" properties, and the video schema sees width/height as "additional" properties

This is a known JSON Schema limitation when combining allOf with additionalProperties: false.

Affected files

  • /static/schemas/source/core/assets/video-asset.json (lines 6-36)
  • /static/schemas/source/core/dimensions.json (line 20)
  • Same issue affects image-asset.json

Proposed fix

Option 1: Remove additionalProperties: false from dimensions.json (since it's always used via allOf)

Option 2: Restructure the schemas to avoid the allOf + additionalProperties conflict, perhaps using $ref with property merging differently

Environment

  • AdCP Schema version: v2.5.0
  • JSON Schema validator: Ajv 8.x
  • JSON Schema draft: draft-07

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions