Sync SDK with Etsy API spec — add max_variations_supported param#23
Merged
amitray007 merged 2 commits intomasterfrom Apr 24, 2026
Merged
Sync SDK with Etsy API spec — add max_variations_supported param#23amitray007 merged 2 commits intomasterfrom
amitray007 merged 2 commits intomasterfrom
Conversation
Sync SDK with latest Etsy OAS spec. The spec added an optional
max_variations_supported query param to PUT /v3/application/listings/{listing_id}/inventory
that gates third-variation support ("2" or "3"). Add a MaxVariationsSupported
enum and wire the param through the resource method.
Also refreshes specs/baseline.json to match the latest spec snapshot.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous warning cited "April 9, 2026" as the API removal date, but that date has passed and Etsy has not yet removed the fields from the spec. Replace with a date-independent message linking to Etsy's personalization migration tutorial, so the warning stays accurate as the actual removal is rescheduled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Test Coverage ReportOverall: 94% (1542/1649 statements covered) Coverage by file
Updated by PR Tests |
There was a problem hiding this comment.
Pull request overview
This PR syncs the Python SDK with the latest Etsy OpenAPI spec by adding support for the new max_variations_supported query parameter on the listing inventory update endpoint, while also modernizing the personalization deprecation warning text and updating the baseline spec snapshot.
Changes:
- Add
max_variations_supported(typed via newMaxVariationsSupportedenum) toListingInventoryResource.update_listing_inventory(). - Update personalization
DeprecationWarningtext to remove the hardcoded removal date and include the migration tutorial link. - Update/extend tests and refresh
specs/baseline.jsonto match the latest spec snapshot.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
etsy_python/v3/resources/ListingInventory.py |
Adds optional max_variations_supported query param and passes its enum value to requests. |
etsy_python/v3/enums/ListingInventory.py |
Introduces MaxVariationsSupported enum ("2" / "3"). |
etsy_python/v3/models/Listing.py |
Updates personalization deprecation warning message content to be date-independent and include migration link. |
tests/test_remaining_resources.py |
Updates inventory update test expectations and adds coverage for explicit max_variations_supported. |
tests/test_listing_models.py |
Updates warning-message assertions to match the new date-independent text. |
specs/baseline.json |
Refreshes checked-in OpenAPI baseline snapshot to the latest spec. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
max_variations_supportedquery parameter (enum"2"|"3") toupdate_listing_inventory()to match the latest Etsy OAS spec — gates third-variation support on the inventory update endpoint.MaxVariationsSupportedenum inetsy_python/v3/enums/ListingInventory.pyfor type safety.DeprecationWarningtext to drop the now-past "April 9, 2026" date and link to Etsy's personalization migration tutorial instead. The spec still carries these fields despite the cited removal date having passed, so a date-independent message stays accurate as the actual removal is rescheduled.specs/baseline.jsonto match the current spec snapshot.Audit findings
Found 0 Must Fix, 2 Should Fix, 6 Informational items. Both Should Fix items are addressed in this PR (the new param + its enum). Informational items (deprecated-alias methods, intentional
State.REMOVED, partialCA_HOLIDAYSenumeration, response-only schema changes likeListingBuyerPrice.is_free_shipping) require no code change.Test plan
pytest— 240 passed, 0 failedpython scripts/audit_sdk.py --spec specs/latest.json— no parameter drift remainingtest_update_listing_inventoryupdated for the newquery_paramsshapetest_update_listing_inventory_with_max_variationscovers the explicit-value path🤖 Generated with Claude Code