diff --git a/changelog/_unreleased/2023-11-15-add-api-aware-flags-to-product-stream-definitions.md b/changelog/_unreleased/2023-11-15-add-api-aware-flags-to-product-stream-definitions.md new file mode 100644 index 00000000000..55b900d3427 --- /dev/null +++ b/changelog/_unreleased/2023-11-15-add-api-aware-flags-to-product-stream-definitions.md @@ -0,0 +1,9 @@ +--- +title: Update product stream definitions to make them ApiAware +issue: 3419 +author: Sander Drenth +author_email: sander.drenth@webstores.nl +author_github: sdrenth +--- +# Core +* Added API aware flag to ProductStreamDefinition id field and ProductStreamTranslationDefinition name field diff --git a/src/Core/Content/ProductStream/Aggregate/ProductStreamTranslation/ProductStreamTranslationDefinition.php b/src/Core/Content/ProductStream/Aggregate/ProductStreamTranslation/ProductStreamTranslationDefinition.php index 32a6cb5b8bb..4f9df063477 100644 --- a/src/Core/Content/ProductStream/Aggregate/ProductStreamTranslation/ProductStreamTranslationDefinition.php +++ b/src/Core/Content/ProductStream/Aggregate/ProductStreamTranslation/ProductStreamTranslationDefinition.php @@ -45,7 +45,7 @@ protected function getParentDefinitionClass(): string protected function defineFields(): FieldCollection { return new FieldCollection([ - (new StringField('name', 'name'))->addFlags(new Required()), + (new StringField('name', 'name'))->addFlags(new ApiAware(), new Required()), (new LongTextField('description', 'description'))->addFlags(new ApiAware()), (new CustomFields())->addFlags(new ApiAware()), ]); diff --git a/src/Core/Content/ProductStream/ProductStreamDefinition.php b/src/Core/Content/ProductStream/ProductStreamDefinition.php index 9f2fc7e169c..8783fa0a108 100644 --- a/src/Core/Content/ProductStream/ProductStreamDefinition.php +++ b/src/Core/Content/ProductStream/ProductStreamDefinition.php @@ -56,7 +56,7 @@ public function getHydratorClass(): string protected function defineFields(): FieldCollection { return new FieldCollection([ - (new IdField('id', 'id'))->addFlags(new PrimaryKey(), new Required()), + (new IdField('id', 'id'))->addFlags(new ApiAware(), new PrimaryKey(), new Required()), (new JsonField('api_filter', 'apiFilter'))->addFlags(new WriteProtected()), (new BoolField('invalid', 'invalid'))->addFlags(new WriteProtected()),