Hi, I'm using web2py to serve RPC methods to a desktop client that a user can download. I'd like to know if anyone has any thoughts on a good way to version my API so that I can keep the older versions available for users that haven't updated their clients.
As a starting point, I'm thinking of subclassing the Service class and adding a version number to the jsonrpc method (an additional argument to the decorator) so that I can have multiple functions with the same name and different versions. I'd then also override the serve_jsonrpc method, look up the appropriate version number from a header in the request, and find the appropriate function for that version in another lookup table I'll create myself. I'll then adjust the request so the name of the function includes that version number and then call the superclass serve_jsonrpc method. I'm trying to avoid having to copy each function into every new version of the API so that I can just fix any bugs in one spot. Any thoughts on this? Too hard? Won't work? If anyone has done this before and can help me out I'd appreciate it. Thanks, Mike -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.