Skip to content

Commit 4dd78da

Browse files
committed
fix(specs): correct type for banners [skip-bc] (generated)
algolia/api-clients-automation#3939 Co-authored-by: algolia-bot <[email protected]>
1 parent cf1842d commit 4dd78da

File tree

6 files changed

+10
-86
lines changed

6 files changed

+10
-86
lines changed

Sources/Recommend/Models/RecommendBannerImage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import Foundation
88

99
/// image of a search banner.
1010
public struct RecommendBannerImage: Codable, JSONEncodable {
11-
public var urls: RecommendBannerImageUrl?
11+
public var urls: [RecommendBannerImageUrl]?
1212
public var title: String?
1313

14-
public init(urls: RecommendBannerImageUrl? = nil, title: String? = nil) {
14+
public init(urls: [RecommendBannerImageUrl]? = nil, title: String? = nil) {
1515
self.urls = urls
1616
self.title = title
1717
}

Sources/Recommend/Models/RecommendBanners.swift

Lines changed: 0 additions & 39 deletions
This file was deleted.

Sources/Recommend/Models/RecommendWidgets.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import Foundation
88

99
/// widgets returned from any rules that are applied to the current search.
1010
public struct RecommendWidgets: Codable, JSONEncodable {
11-
public var banners: RecommendBanners?
11+
/// banners defined in the merchandising studio for the given search.
12+
public var banners: [RecommendBanner]?
1213

13-
public init(banners: RecommendBanners? = nil) {
14+
public init(banners: [RecommendBanner]? = nil) {
1415
self.banners = banners
1516
}
1617

Sources/Search/Models/SearchBannerImage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import Foundation
88

99
/// image of a search banner.
1010
public struct SearchBannerImage: Codable, JSONEncodable {
11-
public var urls: SearchBannerImageUrl?
11+
public var urls: [SearchBannerImageUrl]?
1212
public var title: String?
1313

14-
public init(urls: SearchBannerImageUrl? = nil, title: String? = nil) {
14+
public init(urls: [SearchBannerImageUrl]? = nil, title: String? = nil) {
1515
self.urls = urls
1616
self.title = title
1717
}

Sources/Search/Models/SearchBanners.swift

Lines changed: 0 additions & 39 deletions
This file was deleted.

Sources/Search/Models/SearchWidgets.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import Foundation
88

99
/// widgets returned from any rules that are applied to the current search.
1010
public struct SearchWidgets: Codable, JSONEncodable {
11-
public var banners: SearchBanners?
11+
/// banners defined in the merchandising studio for the given search.
12+
public var banners: [SearchBanner]?
1213

13-
public init(banners: SearchBanners? = nil) {
14+
public init(banners: [SearchBanner]? = nil) {
1415
self.banners = banners
1516
}
1617

0 commit comments

Comments
 (0)