papyrus icon indicating copy to clipboard operation
papyrus copied to clipboard

Support for Vapor?

Open lmcd opened this issue 1 year ago • 3 comments
trafficstars

I'm working on a Swift project that has a server side, and client side. I'd like to unify the definition of endpoints across both builds.

Something like this would be very useful:

let routesBuilder = ...
let provider = Provider(baseURL: "https://api.example.com/")
let users: Users = UsersAPI(provider: provider)

routesBuilder.addRoutes(from: users)

lmcd avatar May 23 '24 17:05 lmcd

Excellent idea - this is actually in progress. Hoping to have an MVP up soon.

Will keep you posted!

joshuawright11 avatar May 23 '24 17:05 joshuawright11

Great to hear! I have a feeling my needs my slightly differ from whatever the base implementation is, so would be very useful to have a means of accessing an array of path components (edit: any HTTP method) for each route, so I can process them manually.

lmcd avatar May 23 '24 18:05 lmcd

How do you think your needs might differ? I can try and work something specific in.

joshuawright11 avatar May 24 '24 05:05 joshuawright11