Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

Resolved schema validation issues by upgrading to adcp 2.2.0 with proper Pydantic types for nested structures. This ensures exclude_none serialization works correctly at all levels, eliminating null values in optional fields.

Test Results: All 213 tests passing (100%) with 68.23% coverage.

Changes

  • Upgraded adcp: 1.2.1 → 2.2.0 for proper Pydantic types and semantic aliases
  • Added discriminator fields for union type validation (adcp 2.1.0+)
  • Updated type enum comparisons to use library Type enum
  • Fixed render/dimension access for both Pydantic models and legacy dicts
  • Updated all tests for new library types and response structures

Verification

Original schema validation issues are fixed:

  • ✅ No more requirements: null in asset fields (formats 17-22)
  • ✅ No more width/height: null in responsive dimensions (formats 39, 41)

bokelley and others added 2 commits November 16, 2025 12:27
This upgrade resolves schema validation issues by using the adcp library's
proper Pydantic types for nested structures (Dimensions, Render, AssetsRequired)
which automatically apply exclude_none serialization.

Changes:
- Upgrade adcp: 1.2.1 → 2.2.0 for proper Pydantic types and semantic aliases
- Add discriminator fields (item_type) for union type validation
- Update type enum comparisons to use library Type instead of local enum
- Fix render/dimension access to support both Pydantic models and dicts
- Update all tests to handle new library types and response structures
- Create deprecated compat module for backward compatibility

All 213 tests now pass with 68.23% coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The adcp 2.2.0 upgrade introduced proper Pydantic types throughout, which
required several changes to pass mypy type checking:

Changes:
- Update helper functions to return library Pydantic models (LibRender, LibAssetsRequired)
- Convert all Format type="string" to type=LibType.enum
- Add AnyUrl() wrapper for all agent_url parameters
- Use library Type enum (LibType) instead of local Type enum in filter signatures
- Remove dict-handling branches (renders/assets always Pydantic models now)
- Use CreativeAgent Pydantic model with Capability enum
- Fix asset_req to use hasattr() instead of isinstance(dict)

All 213 tests passing with 69.49% coverage.
Mypy passes cleanly on all 22 source files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit e63c369 into main Nov 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants