papyrus
papyrus copied to clipboard
Support for Vapor?
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)
Excellent idea - this is actually in progress. Hoping to have an MVP up soon.
Will keep you posted!
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.
How do you think your needs might differ? I can try and work something specific in.