I tried deploying Swagger locally and i was able to open it in browser with the given below url
and also used the Yaml code as given below
swagger: '2.0'info:description: A Simple IP Address APItitle: ipifyversion: v1host: "192.168.56.1:3001"schemes:- https- httpbasePath: /consumes:- application/jsonproduces:- application/jsonpaths:/hello:x-swagger-router-controller: hello_worldget:tags:- hello_worldoperationId: helloparameters:- name: nametype: stringin: querydescription: the nameresponses:"400":description: "Invalid ID supplied""404":description: "Pet not found""405":description: "Validation exception"
when testing it in Swagger UI i get the error as given below in the screen shot
please help to overcome this error
Can you describe how did you "deployed Swagger locally"? Did you use npm scripts from swagger-ui repository (`npm run start`) or are you running your own server where built swagger-ui is being served?From the information that I currently have I don't think CORS is causing requests failure. I can clearly see that you're doing request from the same IP as the swagger-ui is being served. Could you also open developer console in your browser and inspect how the actual request was made and what was the actual response?