That's probably a good idea, the logic for constructing this was copied from the node-swagger-express thing, and is a bit opaque.