Automatically generate an api object from a given swagger schema