Repository navigation
feat(product-type): support savedToLineItem on attribute definitions - #452
Merged
mvantellingen merged 1 commit intoOct 22, 2026
Merged
mvantellingen merged 1 commit into
mvantellingen merged 1 commit into
Conversation
Accept savedToLineItem on AttributeDefinitionDraft (default true, as in the API) and handle the setSavedToLineItem update action. The OpenAPI spec does not carry the field yet, so the schema generator patches it in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mvantellingen
enabled auto-merge (rebase)
October 22, 2026 03:59
This was referenced Oct 22, 2026
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
Product types gain
savedToLineItemon attribute definitions (released 2026-09-30): whether the attribute value is copied onto Line Items.AttributeDefinitionDraftSchemaacceptssavedToLineItem. The RAML spec has it, the OpenAPI spec (oas/api/openapi.yaml, api-referencef6f6f57) does not yet, soEXTRA_PROPERTIESingenerate-schemas.tspatches it in. The schema line is what the generator emits with that patch; the rest of a full regeneration was left out.@commercetools/platform-sdk9.7.0 has the type, but bumping to it also makesCategory.storesrequired, which is its own change.Needed by the
saved_to_line_itemsupport in terraform-provider-commercetools (labd/terraform-provider-commercetools#679), whose acceptance tests run against this mock.Evidence
setSavedToLineItemis not handled.After: new test
Update product type - setSavedToLineItem: create[false, unset]→ reads[false, true]; update →[true, false].Create product typenow expectssavedToLineItem: true.pnpm checkclean (the one biome warning is onmaintoo);pnpm test: 87 files, 947 tests pass.TestAccProductTypes_*withsaved_to_line_itempass against this branch.Merge Danger
Door: two-way
Blast Radius: small
Product type attributes in mock responses gain
savedToLineItem: trueby default, matching the API. Consumers thattoEqualwhole attribute definitions in their own tests will need the field.🤖 Generated with Claude Code