Skip to content

[bug]: OpenAPI generated SearchClientConfiguration swift code missing public init making the API unusable #872

@KaiOelfke

Description

@KaiOelfke

Description

The code at https://github.com/algolia/algoliasearch-client-swift/blob/main/Sources/Search/SearchClientConfiguration.swift is generated. But the generator seems to have a bug as it's missing the public access control modifier for the initializer. So Algolia SDK users can't init this struct as the initialize is internal (default). So the SearchClientConfiguration API is not usable for SDK clients.

public struct SearchClientConfiguration: BaseConfiguration, Credentials {
    public let appID: String
    public var apiKey: String
    public var writeTimeout: TimeInterval
    public var readTimeout: TimeInterval
    public var logLevel: LogLevel
    public var defaultHeaders: [String: String]?
    public var hosts: [RetryableHost]
    public let compression: CompressionAlgorithm

    // Should be public
    init(
        appID: String,
        apiKey: String,
       // ...
    ) throws {  
       // ... 
    }
Bildschirmfoto 2024-10-23 um 09 50 51

Client

All

Version

9.7.3

Relevant log output

'SearchClientConfiguration' initializer is inaccessible due to 'internal' protection level

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions