Changed code to Version 4 of the Open API