app: add a minimal decorator for specifying API methods.