Skip to content

Commit

Permalink
NEXT-31901 - Add ApiAware flags to productStream definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrenth authored and alexdumea committed Nov 22, 2023
1 parent 540d526 commit d347cbc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Update product stream definitions to make them ApiAware
issue: 3419
author: Sander Drenth
author_email: [email protected]
author_github: sdrenth
---
# Core
* Added API aware flag to ProductStreamDefinition id field and ProductStreamTranslationDefinition name field
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Content/ProductStream/ProductStreamDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()),

Expand Down

0 comments on commit d347cbc

Please sign in to comment.