Skip to content

Commit 8233bec

Browse files
bokelleyclaude
andcommitted
chore: sync schemas to AdCP v2.4.0 with discriminated unions
Synced schemas from upstream AdCP repository (v2.4.0): - Added discriminated union constraints to product.json publisher_properties - Added discriminated union constraints to adagents.json authorization - Uses selection_type and authorization_type discriminators - Properly enforces mutual exclusivity via oneOf + const discriminators Note: Current type generation doesn't yet support discriminated unions. Need to update generation approach to properly handle oneOf with discriminators. See UPSTREAM_SCHEMA_ISSUES.md for details on upstream fixes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b23a03d commit 8233bec

File tree

106 files changed

+9048
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+9048
-545
lines changed

UPSTREAM_SCHEMA_ISSUES.md

Lines changed: 407 additions & 0 deletions
Large diffs are not rendered by default.

schemas/cache/1.0.0/adagents.json

Lines changed: 364 additions & 289 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/activation-key.json",
4+
"title": "Activation Key",
5+
"description": "Universal identifier for using a signal on a destination platform. Can be either a segment ID or a key-value pair depending on the platform's targeting mechanism.",
6+
"type": "object",
7+
"oneOf": [
8+
{
9+
"properties": {
10+
"type": {
11+
"type": "string",
12+
"const": "segment_id",
13+
"description": "Segment ID based targeting"
14+
},
15+
"segment_id": {
16+
"type": "string",
17+
"description": "The platform-specific segment identifier to use in campaign targeting"
18+
}
19+
},
20+
"required": ["type", "segment_id"],
21+
"additionalProperties": false
22+
},
23+
{
24+
"properties": {
25+
"type": {
26+
"type": "string",
27+
"const": "key_value",
28+
"description": "Key-value pair based targeting"
29+
},
30+
"key": {
31+
"type": "string",
32+
"description": "The targeting parameter key"
33+
},
34+
"value": {
35+
"type": "string",
36+
"description": "The targeting parameter value"
37+
}
38+
},
39+
"required": ["type", "key", "value"],
40+
"additionalProperties": false
41+
}
42+
]
43+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/asset-type.json",
4+
"title": "Asset Type Schema",
5+
"description": "Schema for describing asset requirements in creative formats",
6+
"type": "object",
7+
"properties": {
8+
"asset_role": {
9+
"type": "string",
10+
"description": "Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')"
11+
},
12+
"type": {
13+
"type": "string",
14+
"enum": ["image", "video", "audio", "text", "html", "css", "javascript", "vast", "daast", "promoted_offerings", "url"],
15+
"description": "Type of asset"
16+
},
17+
"required": {
18+
"type": "boolean",
19+
"default": true,
20+
"description": "Whether this asset is mandatory for the format"
21+
},
22+
"requirements": {
23+
"type": "object",
24+
"description": "Technical requirements for this asset type",
25+
"properties": {
26+
"dimensions": {
27+
"type": "object",
28+
"properties": {
29+
"width": {"type": "integer", "minimum": 1},
30+
"height": {"type": "integer", "minimum": 1},
31+
"aspect_ratio": {"type": "string"},
32+
"min_width": {"type": "integer", "minimum": 1},
33+
"max_width": {"type": "integer", "minimum": 1},
34+
"min_height": {"type": "integer", "minimum": 1},
35+
"max_height": {"type": "integer", "minimum": 1}
36+
}
37+
},
38+
"duration": {
39+
"type": "object",
40+
"properties": {
41+
"min_seconds": {"type": "number", "minimum": 0},
42+
"max_seconds": {"type": "number", "minimum": 0},
43+
"exact_seconds": {"type": "number", "minimum": 0}
44+
}
45+
},
46+
"file_size": {
47+
"type": "object",
48+
"properties": {
49+
"min_bytes": {"type": "integer", "minimum": 0},
50+
"max_bytes": {"type": "integer", "minimum": 1}
51+
}
52+
},
53+
"file_formats": {
54+
"type": "array",
55+
"items": {"type": "string"},
56+
"description": "Acceptable file formats (e.g., ['jpg', 'png'] for images)"
57+
},
58+
"content_length": {
59+
"type": "object",
60+
"properties": {
61+
"min_characters": {"type": "integer", "minimum": 0},
62+
"max_characters": {"type": "integer", "minimum": 1},
63+
"min_words": {"type": "integer", "minimum": 0},
64+
"max_words": {"type": "integer", "minimum": 1}
65+
}
66+
},
67+
"quality": {
68+
"type": "object",
69+
"properties": {
70+
"min_bitrate_kbps": {"type": "integer", "minimum": 1},
71+
"max_bitrate_kbps": {"type": "integer", "minimum": 1},
72+
"min_resolution_dpi": {"type": "integer", "minimum": 72}
73+
}
74+
}
75+
},
76+
"additionalProperties": false
77+
},
78+
"constraints": {
79+
"type": "array",
80+
"items": {"type": "string"},
81+
"description": "Additional constraints or requirements (human-readable)"
82+
},
83+
"examples": {
84+
"type": "array",
85+
"items": {"type": "string"},
86+
"description": "Example values or descriptions for this asset"
87+
}
88+
},
89+
"required": ["asset_role", "type"],
90+
"additionalProperties": false
91+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/audio-asset.json",
4+
"title": "Audio Asset",
5+
"description": "Audio asset with URL and specifications",
6+
"type": "object",
7+
"properties": {
8+
"url": {
9+
"type": "string",
10+
"format": "uri",
11+
"description": "URL to the audio asset"
12+
},
13+
"duration_ms": {
14+
"type": "integer",
15+
"description": "Audio duration in milliseconds",
16+
"minimum": 0
17+
},
18+
"format": {
19+
"type": "string",
20+
"description": "Audio file format (mp3, wav, aac, etc.)"
21+
},
22+
"bitrate_kbps": {
23+
"type": "integer",
24+
"description": "Audio bitrate in kilobits per second",
25+
"minimum": 1
26+
}
27+
},
28+
"required": ["url"],
29+
"additionalProperties": false
30+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/css-asset.json",
4+
"title": "CSS Asset",
5+
"description": "CSS stylesheet asset",
6+
"type": "object",
7+
"properties": {
8+
"content": {
9+
"type": "string",
10+
"description": "CSS content"
11+
},
12+
"media": {
13+
"type": "string",
14+
"description": "CSS media query context (e.g., 'screen', 'print')"
15+
}
16+
},
17+
"required": ["content"],
18+
"additionalProperties": false
19+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/daast-asset.json",
4+
"title": "DAAST Asset",
5+
"description": "DAAST (Digital Audio Ad Serving Template) tag for third-party audio ad serving",
6+
"oneOf": [
7+
{
8+
"type": "object",
9+
"properties": {
10+
"delivery_type": {
11+
"type": "string",
12+
"const": "url",
13+
"description": "Discriminator indicating DAAST is delivered via URL endpoint"
14+
},
15+
"url": {
16+
"type": "string",
17+
"format": "uri",
18+
"description": "URL endpoint that returns DAAST XML"
19+
},
20+
"daast_version": {
21+
"type": "string",
22+
"enum": ["1.0", "1.1"],
23+
"description": "DAAST specification version"
24+
},
25+
"duration_ms": {
26+
"type": "integer",
27+
"description": "Expected audio duration in milliseconds (if known)",
28+
"minimum": 0
29+
},
30+
"tracking_events": {
31+
"type": "array",
32+
"items": {
33+
"type": "string",
34+
"enum": [
35+
"start",
36+
"firstQuartile",
37+
"midpoint",
38+
"thirdQuartile",
39+
"complete",
40+
"impression",
41+
"pause",
42+
"resume",
43+
"skip",
44+
"mute",
45+
"unmute"
46+
]
47+
},
48+
"description": "Tracking events supported by this DAAST tag"
49+
},
50+
"companion_ads": {
51+
"type": "boolean",
52+
"description": "Whether companion display ads are included"
53+
}
54+
},
55+
"required": ["delivery_type", "url"],
56+
"additionalProperties": false
57+
},
58+
{
59+
"type": "object",
60+
"properties": {
61+
"delivery_type": {
62+
"type": "string",
63+
"const": "inline",
64+
"description": "Discriminator indicating DAAST is delivered as inline XML content"
65+
},
66+
"content": {
67+
"type": "string",
68+
"description": "Inline DAAST XML content"
69+
},
70+
"daast_version": {
71+
"type": "string",
72+
"enum": ["1.0", "1.1"],
73+
"description": "DAAST specification version"
74+
},
75+
"duration_ms": {
76+
"type": "integer",
77+
"description": "Expected audio duration in milliseconds (if known)",
78+
"minimum": 0
79+
},
80+
"tracking_events": {
81+
"type": "array",
82+
"items": {
83+
"type": "string",
84+
"enum": [
85+
"start",
86+
"firstQuartile",
87+
"midpoint",
88+
"thirdQuartile",
89+
"complete",
90+
"impression",
91+
"pause",
92+
"resume",
93+
"skip",
94+
"mute",
95+
"unmute"
96+
]
97+
},
98+
"description": "Tracking events supported by this DAAST tag"
99+
},
100+
"companion_ads": {
101+
"type": "boolean",
102+
"description": "Whether companion display ads are included"
103+
}
104+
},
105+
"required": ["delivery_type", "content"],
106+
"additionalProperties": false
107+
}
108+
]
109+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/html-asset.json",
4+
"title": "HTML Asset",
5+
"description": "HTML content asset",
6+
"type": "object",
7+
"properties": {
8+
"content": {
9+
"type": "string",
10+
"description": "HTML content"
11+
},
12+
"version": {
13+
"type": "string",
14+
"description": "HTML version (e.g., 'HTML5')"
15+
}
16+
},
17+
"required": ["content"],
18+
"additionalProperties": false
19+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/image-asset.json",
4+
"title": "Image Asset",
5+
"description": "Image asset with URL and dimensions",
6+
"type": "object",
7+
"properties": {
8+
"url": {
9+
"type": "string",
10+
"format": "uri",
11+
"description": "URL to the image asset"
12+
},
13+
"width": {
14+
"type": "integer",
15+
"description": "Image width in pixels",
16+
"minimum": 1
17+
},
18+
"height": {
19+
"type": "integer",
20+
"description": "Image height in pixels",
21+
"minimum": 1
22+
},
23+
"format": {
24+
"type": "string",
25+
"description": "Image file format (jpg, png, gif, webp, etc.)"
26+
},
27+
"alt_text": {
28+
"type": "string",
29+
"description": "Alternative text for accessibility"
30+
}
31+
},
32+
"required": ["url"],
33+
"additionalProperties": false
34+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "/schemas/v1/core/assets/javascript-asset.json",
4+
"title": "JavaScript Asset",
5+
"description": "JavaScript code asset",
6+
"type": "object",
7+
"properties": {
8+
"content": {
9+
"type": "string",
10+
"description": "JavaScript content"
11+
},
12+
"module_type": {
13+
"type": "string",
14+
"enum": ["esm", "commonjs", "script"],
15+
"description": "JavaScript module type"
16+
}
17+
},
18+
"required": ["content"],
19+
"additionalProperties": false
20+
}

0 commit comments

Comments
 (0)