Skip to content

0.6.25

Latest

Choose a tag to compare

@KhoraLee KhoraLee released this 09 Dec 03:40
4f2eed8

Release Notes

Bug Fixes

  • Encoder strategies now work with Field/Query parameters: JSONEncoder strategies (dateEncodingStrategy,
    dataEncodingStrategy, nonConformingFloatEncodingStrategy) and URLEncodedFormEncoder strategies are now correctly
    applied when using individual Field or Query parameters.
@API
protocol MyAPI {
    @POST("/events")
    @JSON(encoder: .iso8601DateEncoder)
    func createEvent(name: String, date: Date) async throws -> Event
}

// Before: date encoded as timeIntervalSinceReferenceDate (default)
// {"name":"Party","date":788918400.0}

// After: date encoded as ISO8601 string (respects encoder strategy)
// {"name":"Party","date":"1995-01-01T00:00:00Z"}

Full Changelog: 0.6.24...0.6.25