Skip to content

Releases: KhoraLee/papyrus

0.6.25

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

0.6.24

Choose a tag to compare

@KhoraLee KhoraLee released this 08 Dec 07:27
a9c83c1

Release Notes

New Features

  • Automatic attribute preservation: Swift attributes like @discardableResult, @available, @MainActor, @Sendable,
    etc. are now automatically preserved on generated API endpoint implementations. No manual updates needed for new Swift
    attributes.
@API
protocol MyAPI {
    @available(iOS 15.0, *)
    @discardableResult
    @GET("/endpoint")
    func fetchData() async throws -> String
}

// Generated implementation preserves all attributes:
// @available(iOS 15.0, *) @discardableResult func fetchData() async throws -> String { ... }

Bug Fixes

  • Multiple HTTP methods validation: Using multiple HTTP method attributes on a single endpoint (e.g. both @GET and @POST)
    now throws a compile-time error instead of silently using the last one.

Full Changelog: 0.6.23...0.6.24

0.6.23

Choose a tag to compare

@KhoraLee KhoraLee released this 17 Oct 01:44
02f3414

What's Changed

  • Preserve @discardableResult attribute on API endpoints (02f3414)

Now the @discardableResult attribute from protocol method declarations is preserved in the generated implementation
code.

0.6.22

Choose a tag to compare

@KhoraLee KhoraLee released this 25 Sep 03:33
5901c28

Full Changelog: 0.6.21...0.6.22