swagger-api / validator-badge

Validate your Swagger JSON/YAML today!
http://swagger.io
Apache License 2.0
210 stars 85 forks source link

Long response times when validating #101

Open stephan2012 opened 7 years ago

stephan2012 commented 7 years ago

We're running the Docker Image of the validator badge. When trying to validate from an internal resource it takes 2+ minutes to get a response:

root@80b4f461309a:/validator# time curl http://localhost:8080/?url=http://my.host.domain:8041/my/path/swagger.json
[…]
real    2m7.294s
user    0m0.015s
sys     0m0.010s

Accessing the given url directly works without any issues:

root@80b4f461309a:/validator# curl http://my.host.domain:8041/my/path/swagger.json
{
  "swagger" : "2.0",
  "info" : {

Looks like it runs into timeout. The container has no Internet access and it responds quickly when not passing a url.

Any pointers to what's going on?

fehguy commented 7 years ago

The container is attempting to get the schema which is online. We can create a flag so it does not do so