Skip to content

Sync SDK with Etsy API spec — add max_variations_supported param#23

Merged
amitray007 merged 2 commits intomasterfrom
release/sdk-audit-2026-04-25
Apr 24, 2026
Merged

Sync SDK with Etsy API spec — add max_variations_supported param#23
amitray007 merged 2 commits intomasterfrom
release/sdk-audit-2026-04-25

Conversation

@amitray007
Copy link
Copy Markdown
Owner

Summary

  • Adds max_variations_supported query parameter (enum "2" | "3") to update_listing_inventory() to match the latest Etsy OAS spec — gates third-variation support on the inventory update endpoint.
  • New MaxVariationsSupported enum in etsy_python/v3/enums/ListingInventory.py for type safety.
  • Updates the personalization DeprecationWarning text 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.
  • Refreshes specs/baseline.json to 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, partial CA_HOLIDAYS enumeration, response-only schema changes like ListingBuyerPrice.is_free_shipping) require no code change.

Test plan

  • pytest — 240 passed, 0 failed
  • python scripts/audit_sdk.py --spec specs/latest.json — no parameter drift remaining
  • Existing test_update_listing_inventory updated for the new query_params shape
  • New test_update_listing_inventory_with_max_variations covers the explicit-value path
  • Personalization deprecation-warning tests updated to assert the new message content

🤖 Generated with Claude Code

amitray007 and others added 2 commits April 25, 2026 04:48
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>
@amitray007 amitray007 self-assigned this Apr 24, 2026
Copilot AI review requested due to automatic review settings April 24, 2026 23:25
@github-actions
Copy link
Copy Markdown
Contributor

Test Coverage Report

Overall: 94% (1542/1649 statements covered)

Coverage by file
File Statements Missing Coverage
etsy_python/v3/auth/OAuth.py 33 33 0%
etsy_python/v3/auth/__init__.py 1 1 0%
etsy_python/v3/enums/Language.py 12 12 0%
etsy_python/v3/models/ProcessingProfile.py 21 10 52%
etsy_python/v3/models/ShopReturnPolicy.py 25 11 56%
etsy_python/v3/resources/ProcessingProfile.py 26 11 58%
etsy_python/v3/models/HolidayPreferences.py 8 2 75%
etsy_python/v3/models/Miscellaneous.py 8 2 75%
etsy_python/v3/common/Utils.py 31 4 87%
etsy_python/v3/exceptions/RequestException.py 8 1 88%
etsy_python/v3/resources/Response.py 9 1 89%
etsy_python/v3/exceptions/BaseAPIException.py 10 1 90%
etsy_python/v3/models/Request.py 22 2 91%
etsy_python/v3/resources/Listing.py 81 6 93%
etsy_python/v3/models/Listing.py 148 9 94%
etsy_python/v3/resources/Session.py 94 1 99%
etsy_python/__init__.py 2 0 100%
etsy_python/_version.py 1 0 100%
etsy_python/v3/common/Env.py 10 0 100%
etsy_python/v3/common/Request.py 3 0 100%
etsy_python/v3/enums/HolidayPreferences.py 29 0 100%
etsy_python/v3/enums/Listing.py 78 0 100%
etsy_python/v3/enums/ListingInventory.py 6 0 100%
etsy_python/v3/enums/ProcessingProfile.py 7 0 100%
etsy_python/v3/enums/ShippingProfile.py 261 0 100%
etsy_python/v3/enums/ShopReceipt.py 12 0 100%
etsy_python/v3/exceptions/__init__.py 2 0 100%
etsy_python/v3/models/FileRequest.py 7 0 100%
etsy_python/v3/models/Product.py 7 0 100%
etsy_python/v3/models/Receipt.py 18 0 100%
etsy_python/v3/models/ShippingProfile.py 85 0 100%
etsy_python/v3/models/Shop.py 24 0 100%
etsy_python/v3/models/Utils.py 19 0 100%
etsy_python/v3/models/__init__.py 10 0 100%
etsy_python/v3/resources/HolidayPreferences.py 19 0 100%
etsy_python/v3/resources/ListingFile.py 22 0 100%
etsy_python/v3/resources/ListingImage.py 22 0 100%
etsy_python/v3/resources/ListingInventory.py 20 0 100%
etsy_python/v3/resources/ListingOffering.py 12 0 100%
etsy_python/v3/resources/ListingProduct.py 12 0 100%
etsy_python/v3/resources/ListingTranslation.py 19 0 100%
etsy_python/v3/resources/ListingVariationImages.py 16 0 100%
etsy_python/v3/resources/ListingVideo.py 22 0 100%
etsy_python/v3/resources/Miscellaneous.py 16 0 100%
etsy_python/v3/resources/Payment.py 23 0 100%
etsy_python/v3/resources/PaymentLedgerEntry.py 15 0 100%
etsy_python/v3/resources/Receipt.py 25 0 100%
etsy_python/v3/resources/ReceiptTransactions.py 27 0 100%
etsy_python/v3/resources/Review.py 16 0 100%
etsy_python/v3/resources/ShippingProfile.py 58 0 100%
etsy_python/v3/resources/Shop.py 23 0 100%
etsy_python/v3/resources/ShopProductionPartner.py 11 0 100%
etsy_python/v3/resources/ShopReturnPolicy.py 28 0 100%
etsy_python/v3/resources/ShopSection.py 25 0 100%
etsy_python/v3/resources/Taxonomy.py 23 0 100%
etsy_python/v3/resources/User.py 14 0 100%
etsy_python/v3/resources/UserAddress.py 19 0 100%
etsy_python/v3/resources/__init__.py 29 0 100%
etsy_python/v3/resources/enums/RateLimit.py 8 0 100%
etsy_python/v3/resources/enums/Request.py 7 0 100%

Updated by PR Tests

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new MaxVariationsSupported enum) to ListingInventoryResource.update_listing_inventory().
  • Update personalization DeprecationWarning text to remove the hardcoded removal date and include the migration tutorial link.
  • Update/extend tests and refresh specs/baseline.json to 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.

@amitray007 amitray007 merged commit bc742cd into master Apr 24, 2026
10 checks passed
@amitray007 amitray007 deleted the release/sdk-audit-2026-04-25 branch April 24, 2026 23:48
@amitray007 amitray007 linked an issue Apr 25, 2026 that may be closed by this pull request
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.

audit: Spec Drift [2026-04-20] — medium

2 participants