jpventura / loopback-petstore

All your bases are belong to us
0 stars 1 forks source link

Reconfigure datasources.json #1

Open Sun-Wukong opened 6 years ago

Sun-Wukong commented 6 years ago

Hey JP, I noticed that your Swagger connector points to the actual API endpoint. No need to do that, just point your spec attribute towards the location of your swagger file. The connector uses the host property within your swagger file, to perform API requests.

jpventura commented 6 years ago

@Sun-Wukong the error happens for both configurations:

{
  "petstore": {
    "name": "petstore",
    "connector": "swagger",
    "spec": "swagger.json"
  }
}

and

{
  "petstore": {
    "name": "petstore",
    "connector": "swagger",
    "spec": "http://petstore.swagger.io/v2/swagger.json"
  }
}