feat: standardize format field naming for clarity and consistency #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implement consistent naming convention to eliminate confusion between format objects and format IDs across the AdCP API.
Problem
The current API has inconsistent usage of
"formats"which causes developer confusion:"formats"contains format objects (with full details)"formats"contains format ID strings (just references)get_productsrequest had redundant"formats"and"format_types"filtersSolution
Establish clear, consistent naming convention:
"formats"= array of format objects (with full details like name, type, requirements)"format_ids"= array of format ID strings (references to format objects)"format_types"= array of high-level type strings (video, display, audio)Changes Made
Schema Changes
"formats"→"format_ids"(array of format ID strings)"formats"filter (duplicated format_types functionality)"formats"→"format_ids"(array of format ID strings)Documentation Updates
What Stayed the Same
These correctly kept
"formats"because they contain format objects:list_creative_formatsresponse (returns full format objects)list_creativesfilters (filters by format types like "video", "audio")Benefits
✅ Eliminates confusion - Field names immediately indicate content type
✅ Consistent API design - Same pattern across all endpoints
✅ Better developer experience - Self-documenting field names
✅ Cleaner filtering - Removed redundant filter options
Testing
Breaking Changes
This is a breaking change for:
formatsfield renamed toformat_idsformatsfield renamed toformat_idsformatsfilter removed (useformat_typesorformat_ids)Clients will need to update their code to use the new field names.
🤖 Generated with Claude Code