Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
KaiOelfke opened this issue Oct 23, 2024 · 1 comment · Fixed by algolia/api-clients-automation#4028
Assignees
Labels

Comments

@KaiOelfke
Copy link

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
@Fluf22
Copy link
Contributor

Fluf22 commented Oct 24, 2024

Thank you for the report @KaiOelfke!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants