Skip to content

Commit

Permalink
fix(specs): correct type for banners [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3939

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
  • Loading branch information
algolia-bot committed Oct 10, 2024
1 parent cf1842d commit 4dd78da
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 86 deletions.
4 changes: 2 additions & 2 deletions Sources/Recommend/Models/RecommendBannerImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Foundation

/// image of a search banner.
public struct RecommendBannerImage: Codable, JSONEncodable {
public var urls: RecommendBannerImageUrl?
public var urls: [RecommendBannerImageUrl]?
public var title: String?

public init(urls: RecommendBannerImageUrl? = nil, title: String? = nil) {
public init(urls: [RecommendBannerImageUrl]? = nil, title: String? = nil) {
self.urls = urls
self.title = title
}
Expand Down
39 changes: 0 additions & 39 deletions Sources/Recommend/Models/RecommendBanners.swift

This file was deleted.

5 changes: 3 additions & 2 deletions Sources/Recommend/Models/RecommendWidgets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import Foundation

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

public init(banners: RecommendBanners? = nil) {
public init(banners: [RecommendBanner]? = nil) {
self.banners = banners
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/Search/Models/SearchBannerImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Foundation

/// image of a search banner.
public struct SearchBannerImage: Codable, JSONEncodable {
public var urls: SearchBannerImageUrl?
public var urls: [SearchBannerImageUrl]?
public var title: String?

public init(urls: SearchBannerImageUrl? = nil, title: String? = nil) {
public init(urls: [SearchBannerImageUrl]? = nil, title: String? = nil) {
self.urls = urls
self.title = title
}
Expand Down
39 changes: 0 additions & 39 deletions Sources/Search/Models/SearchBanners.swift

This file was deleted.

5 changes: 3 additions & 2 deletions Sources/Search/Models/SearchWidgets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import Foundation

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

public init(banners: SearchBanners? = nil) {
public init(banners: [SearchBanner]? = nil) {
self.banners = banners
}

Expand Down

0 comments on commit 4dd78da

Please sign in to comment.