codegen: implement generic URI processing

Change-Id: I36d3914a0b8f639d0d6a32d1cc3ef18e6fb63541
Signed-off-by: Michael Pasternak <mpastern@redhat.com>