ergo / pyramid_apispec

Pyramid plugin for openapi spec generation (using ApiSpec)
BSD 3-Clause "New" or "Revised" License
23 stars 10 forks source link

Error when loading demo #2

Closed stevepiercy closed 6 years ago

stevepiercy commented 6 years ago

For the demo app, in the lower right corner of the Swagger UI, there is a red icon labeled "Error". Clicking the icon opens a new browser tab with the URL and content:

https://online.swagger.io/validator/debug?url=http://0.0.0.0:6543/openapi.json

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://0.0.0.0:6543/openapi.json"}]}
ergo commented 6 years ago

Seems this is because swagger UI by default tries to do online validation of the schema passing the URL to their online validator. I'm thinking if I should leave it as it is or disable it by default. This does not impact functionality in any way as it is.

ergo commented 6 years ago

Update, this only happens on 0.0.0.0 if you visit on 127.0.0.1, then validator does not try to check the schema and no errors are printed.

ergo commented 6 years ago

I've updated the demo to suggest using 127.0.0.1 so I'm closing this.