Skip to content

Commit

Permalink
ECWID-116234 Implement alt-text support for all category images | Add…
Browse files Browse the repository at this point in the history
… nullable rule for FetchedAlt
  • Loading branch information
ZimuZhengLightspeed committed Jan 24, 2024
1 parent 2feb363 commit cff9084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ecwid.apiclient.v3.rule.nullablepropertyrules

import com.ecwid.apiclient.v3.dto.category.result.FetchedCategory
import com.ecwid.apiclient.v3.dto.common.FetchedAlt
import com.ecwid.apiclient.v3.rule.NullablePropertyRule
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.IgnoreNullable
Expand All @@ -27,4 +28,6 @@ val fetchedCategoryNullablePropertyRules: List<NullablePropertyRule<*, *>> = lis
AllowNullable(FetchedCategory::seoDescription),
AllowNullable(FetchedCategory::seoDescriptionTranslated),
AllowNullable(FetchedCategory::alt),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ecwid.apiclient.v3.rule.nullablepropertyrules

import com.ecwid.apiclient.v3.dto.common.FetchedAlt
import com.ecwid.apiclient.v3.dto.product.result.FetchedProduct
import com.ecwid.apiclient.v3.rule.NullablePropertyRule
import com.ecwid.apiclient.v3.rule.NullablePropertyRule.AllowNullable
Expand Down Expand Up @@ -99,6 +100,8 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
IgnoreNullable(FetchedProduct.ProductImage::image800pxUrl),
IgnoreNullable(FetchedProduct.ProductImage::imageOriginalUrl),
AllowNullable(FetchedProduct.ProductImage::alt),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
AllowNullable(FetchedProduct.ProductVideo::videoCoverId),
AllowNullable(FetchedProduct.ProductVideo::image160pxUrl),
AllowNullable(FetchedProduct.ProductVideo::image400pxUrl),
Expand Down

0 comments on commit cff9084

Please sign in to comment.