You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the models generated only contain type AnyCodable? even though I explicitly defined them in my yaml file. Is there a way to configure this so that only specified types are used? I used version 3.0.3 before this and it worked fine. However, now I need to implement an interceptor for refresh token logic using taskCompletionShouldRetry.
Generated Model:
public struct ErrorResponseBody: Codable, JSONEncodable, Hashable {
public var errorCode: AnyCodable? // <-- TODO: Want errorCode and detail to both be type String.
public var detail: AnyCodable?
public init(errorCode: AnyCodable?, detail: AnyCodable? = nil) {
self.errorCode = errorCode
self.detail = detail
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case errorCode = "error_code"
case detail
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(errorCode, forKey: .errorCode)
try container.encodeIfPresent(detail, forKey: .detail)
}
}
Hi, sorry for the late response.
I tested it locally and I can reproduce the issue.
I have no idea why, but I think it may be an issue with your spec file?
Sorry but I don't currently have much time to look into this.
Hello, I'm new to using openapi-generator. Like the title says, I ran the command below to generate a Swift Client:
All the models generated only contain type AnyCodable? even though I explicitly defined them in my yaml file. Is there a way to configure this so that only specified types are used? I used version 3.0.3 before this and it worked fine. However, now I need to implement an interceptor for refresh token logic using taskCompletionShouldRetry.
Generated Model:
Yaml file:
Thank you.
cc: @4brunu
The text was updated successfully, but these errors were encountered: