swagger-api / validator-badge

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

Validator giving 500 errors when validating a definition on Azure via HTTPS #18

Closed dillorscroft closed 9 years ago

dillorscroft commented 9 years ago

Within the UI the validation image is coming up with an error in red. Investigating it I go to this page in the browser http://online.swagger.io/validator/debug?url=https://microsoft-apiapp1c74ef90d4ec4d5f8dd8b4d1fbc3504c.azurewebsites.net:443/swagger/docs/v1 and get a 500 error. However if I download the json and host it on another site it does work. http://online.swagger.io/validator/debug?url=http://soccerweekend.com/swagger.txt <<<< .txt as I couldnt quickly change MIME types.

Therefore the JSON is valid so it's a permission/hosting issue. https://microsoft-apiapp1c74ef90d4ec4d5f8dd8b4d1fbc3504c.azurewebsites.net:443/swagger/docs/v1 is accessible though.... Very weird.

fehguy commented 9 years ago

Something is causing the server to return a 500 directly. Can yo uplease check your logs?

Server returned HTTP response code: 500 for URL: https://microsoft-apiapp1c74ef90d4ec4d5f8dd8b4d1fbc3504c.azurewebsites.net:443/swagger/docs/v1

Maks3w commented 9 years ago

I guess fails because is not able to work with sites with SNI enabled. (multiple SSL vhosts under the same IP)

Probably just updating the Java version to >= 1.7 is enough

dillorscroft commented 9 years ago

This is an Azure website with no access to the underlying host.

Maks3w commented 9 years ago

I was talking about the validator host.

dillorscroft commented 9 years ago

Ah... OK. thanks

fehguy commented 9 years ago

@dillorscroft are you running the validator locally? We found a bug in Azure that is addressed with this commit:

https://github.com/swagger-api/validator-badge/commit/5458e92cc1f82654f6b21bfc02d1e9431427eff0

fehguy commented 9 years ago

closing this as a confirmed issue in Azure. the above commit addresses it.