Hi,
I was getting this error
Optional(Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 0", intValue: 0), "start_date"], debugDescription: "Date string does not match format expected by formatter.", underlyingError: nil)))
When
ActivitiesAPI.getLoggedInAthleteActivities { activities, error in
debugPrint(activities as Any)
debugPrint(error as Any)
}
I saw the option to change the format in Configuration.swift. The error still was still happening. I ended up changing it in CodableHelper.swift
to
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssX"
Which works.
Is this the best place to do so, feels like I shouldn't be modifying the generated code?
Thanks,
T/O