Skip to content

Commit 9ea76f3

Browse files
bokelleyclaude
andcommitted
feat: add semantic filter type aliases
Add ProductFilters, CreativeFilters, and SignalFilters type aliases to resolve name collisions where multiple `Filters` classes exist in different request modules. - ProductFilters: Filters for GetProductsRequest (6 fields for product discovery) - CreativeFilters: Filters for ListCreativesRequest (17 fields for creative library queries) - SignalFilters: Filters for GetSignalsRequest (4 fields for signal discovery) These aliases follow the established pattern in aliases.py for resolving discriminated union name collisions. Upstream schemas now properly define Filter classes as nested objects with properties, so the generator creates proper Pydantic models. Resolves feedback from downstream client regarding Filters type ambiguity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 68077c7 commit 9ea76f3

File tree

134 files changed

+1961
-1223
lines changed

Some content is hidden

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

134 files changed

+1961
-1223
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ regenerate-schemas: ## Download latest schemas and regenerate models
4747
@echo "Fixing schema references..."
4848
$(PYTHON) scripts/fix_schema_refs.py
4949
@echo "Generating Pydantic models..."
50-
$(PYTHON) scripts/generate_models_simple.py
50+
$(PYTHON) scripts/generate_types.py
5151
@echo "✓ Schemas regenerated successfully"
5252

5353
validate-generated: ## Validate generated code (syntax and imports)
@@ -99,7 +99,7 @@ check-schema-drift: ## Check if schemas are out of sync with upstream
9999
@echo "Checking for schema drift..."
100100
@$(PYTHON) scripts/sync_schemas.py
101101
@$(PYTHON) scripts/fix_schema_refs.py
102-
@$(PYTHON) scripts/generate_models_simple.py
102+
@$(PYTHON) scripts/generate_types.py
103103
@if git diff --exit-code src/adcp/types/generated.py schemas/cache/; then \
104104
echo "✓ Schemas are up-to-date"; \
105105
else \

schemas/cache/.hashes.json

Lines changed: 61 additions & 27 deletions
Large diffs are not rendered by default.

schemas/cache/1.0.0/activate-signal-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"deployments": {
1313
"description": "Target deployment(s) for activation. If the authenticated caller matches one of these deployment targets, activation keys will be included in the response.",
1414
"items": {
15-
"$ref": "/schemas/v1/core/destination.json"
15+
"$ref": "destination.json"
1616
},
1717
"minItems": 1,
1818
"type": "array"

schemas/cache/1.0.0/activate-signal-response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"deployments": {
2121
"description": "Array of deployment results for each deployment target",
2222
"items": {
23-
"$ref": "/schemas/v1/core/deployment.json"
23+
"$ref": "deployment.json"
2424
},
2525
"type": "array"
2626
}
@@ -47,7 +47,7 @@
4747
"errors": {
4848
"description": "Array of errors explaining why activation failed (e.g., platform connectivity issues, signal definition problems, authentication failures)",
4949
"items": {
50-
"$ref": "/schemas/v1/core/error.json"
50+
"$ref": "error.json"
5151
},
5252
"minItems": 1,
5353
"type": "array"

schemas/cache/1.0.0/adagents.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
"properties": {
319319
"description": "Specific properties this agent is authorized for (alternative to property_ids/property_tags)",
320320
"items": {
321-
"$ref": "/schemas/v1/core/property.json"
321+
"$ref": "property.json"
322322
},
323323
"minItems": 1,
324324
"type": "array"
@@ -354,7 +354,7 @@
354354
"publisher_properties": {
355355
"description": "Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell",
356356
"items": {
357-
"$ref": "/schemas/v1/core/publisher-property-selector.json"
357+
"$ref": "publisher-property-selector.json"
358358
},
359359
"minItems": 1,
360360
"type": "array"
@@ -426,7 +426,7 @@
426426
"properties": {
427427
"description": "Array of all properties covered by this adagents.json file. Same structure as list_authorized_properties response.",
428428
"items": {
429-
"$ref": "/schemas/v1/core/property.json"
429+
"$ref": "property.json"
430430
},
431431
"minItems": 1,
432432
"type": "array"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$id": "/schemas/v1/enums/adcp-domain.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "AdCP protocol domains for task categorization",
5+
"enum": [
6+
"media-buy",
7+
"signals"
8+
],
9+
"title": "AdCP Domain",
10+
"type": "string"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$id": "/schemas/v1/enums/auth-scheme.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Authentication schemes for push notification endpoints",
5+
"enum": [
6+
"Bearer",
7+
"HMAC-SHA256"
8+
],
9+
"title": "Authentication Scheme",
10+
"type": "string"
11+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$id": "/schemas/v1/enums/available-metric.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Standard delivery and performance metrics available for reporting",
5+
"enum": [
6+
"impressions",
7+
"spend",
8+
"clicks",
9+
"ctr",
10+
"video_completions",
11+
"completion_rate",
12+
"conversions",
13+
"viewability",
14+
"engagement_rate"
15+
],
16+
"title": "Available Metric",
17+
"type": "string"
18+
}

schemas/cache/1.0.0/brand-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"type": "string"
126126
},
127127
"asset_type": {
128-
"$ref": "/schemas/v1/enums/asset-content-type.json",
128+
"$ref": "asset-content-type.json",
129129
"description": "Type of asset. Note: Brand manifests typically contain basic media assets (image, video, audio, text). Code assets (html, javascript, css) and ad markup (vast, daast) are usually not part of brand asset libraries."
130130
},
131131
"description": {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$id": "/schemas/v1/enums/co-branding-requirement.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Co-branding policy for creatives (retailer/publisher brand inclusion)",
5+
"enum": [
6+
"required",
7+
"optional",
8+
"none"
9+
],
10+
"title": "Co-Branding Requirement",
11+
"type": "string"
12+
}

0 commit comments

Comments
 (0)