Commit d61ca33
feat: integrate AdCP schema improvements (PR #222 + #223) (#73)
* feat: resolve schema collisions with AssetContentType, FormatCategory, and unified Package
Implements changes from upstream AdCP PR #222 and PR #223:
**New Types (PR #222)**
- AssetContentType: Consolidated enum for asset content types (13 values)
- FormatCategory: Semantic enum for format categories (7 values)
**Unified Package (PR #223)**
- create_media_buy and update_media_buy now return full Package objects
- Removed CreatedPackageReference (deprecated)
- Better API consistency and developer experience
**Breaking Changes**
- Removed CreatedPackageReference: use Package directly
- Removed AffectedPackage: removed from upstream schemas
**Backward Compatibility**
- AssetType maintained as deprecated alias to AssetContentType
Test results: 283/295 passing (12 failures for removed CreatedPackageReference - expected)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test: remove obsolete CreatedPackageReference tests
Removed 5 test functions that tested CreatedPackageReference since this type
was removed in AdCP PR #223. The PR unified Package responses so that both
create_media_buy and update_media_buy now return full Package objects instead
of minimal references.
Removed tests:
- test_package_type_aliases_imports
- test_package_type_aliases_point_to_correct_modules
- test_package_type_aliases_have_correct_fields
- test_package_type_aliases_in_exports
- test_package_aliases_can_instantiate
All 290 tests now pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: consolidate schema analysis into changelog, remove temp docs
Removed temporary documentation files (SCHEMA_COLLISION_PROPOSAL.md,
UPSTREAM_SCHEMA_RECOMMENDATIONS.md) that were used during analysis.
Enhanced CHANGELOG_ENTRY.md to include:
- Detailed description of upstream schema improvements (PR #222 + #223)
- Complete list of new types with all enum values
- Expanded migration guide with more examples
- Upstream recommendations identified during integration
The key findings (orphaned asset-type.json, enum organization suggestions,
discriminator standardization opportunities) are now captured in the changelog
for future reference.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove orphaned asset-type.json and update schemas
Upstream PR #222 removed the orphaned asset-type.json schema file. Our local
cache had stale copies that were no longer referenced upstream.
Changes:
- Removed stale asset-type.json from schemas/cache/1.0.0/
- Removed asset_type.py generated file (no longer has upstream schema)
- Removed orphaned type exports: AssetTypeSchema, ContentLength, Dimensions,
Duration, FileSize, Quality, Requirements
- Added deprecation alias: AssetType = AssetContentType
- Synced 6 updated schemas (deployment, destination, activate-signal, get-signals)
The sync discovered asset-type.json was 404 upstream - it was removed in PR #222
as part of the enum consolidation work.
Tests: 288/290 passing (2 failures in signals tests due to schema API changes
from destinations → deployments in upstream)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: update changelog to reflect upstream already removed asset-type.json
The orphaned asset-type.json was already removed by the AdCP team in PR #222.
Updated changelog to acknowledge this was properly handled upstream.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: automatically remove orphaned schemas during sync
Added automatic cleanup of schema files that no longer exist upstream.
This prevents stale cached schemas from causing issues when upstream
removes or renames schema files.
Changes:
- Scan for JSON files in cache that aren't in the upstream schema list
- Remove orphaned files and their empty parent directories
- Report removed count in sync summary
- Updated script documentation to explain new feature
Example output:
Cleaning up orphaned schemas:
✗ asset-type.json (removed - no longer in upstream)
✗ core/asset-type.json (removed - no longer in upstream)
This would have automatically caught the stale asset-type.json files
that were orphaned after PR #222.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: update signals API tests for destinations → deployments change
Upstream schema updates changed the signals API from using 'destinations'
to 'deployments'. Updated test fixtures to match new API structure.
Changes:
- GetSignalsRequest.deliver_to.destinations → deployments
- ActivateSignalRequest.destinations → deployments
Tests now passing: 290/290 (100%)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: remove temporary changelog entry file
Release Please will automatically generate changelog from commits.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: resolve linter errors in stable.py and __init__.py
- Fix import sorting per ruff I001 rules
- Fix line length by moving comment above import
- Remove orphaned 'Requirements' from __all__ (type was removed with asset-type.json)
All linter checks now passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f9432a3 commit d61ca33
File tree
23 files changed
+120
-542
lines changed- schemas/cache/1.0.0
- core
- scripts
- src/adcp
- types
- generated_poc
- tests
23 files changed
+120
-542
lines changedThis file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| |||
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| 216 | + | |
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
| |||
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
222 | 260 | | |
223 | 261 | | |
224 | 262 | | |
| |||
237 | 275 | | |
238 | 276 | | |
239 | 277 | | |
| 278 | + | |
| 279 | + | |
240 | 280 | | |
241 | 281 | | |
242 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
0 commit comments