swagger-api / validator-badge

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

Broken online validation #118

Open denismakogon opened 6 years ago

denismakogon commented 6 years ago

Swagger spec content validation methods don't work. Assume you have the swagger spec and doc/ directory. README says that i can validation my spec using cURL:

curl -v -X POST -d @docs/swagger.yml -H 'Content-Type:application/json' http://online.swagger.io/validator/debug

But it fails with HTTP 500 Internal server error:

< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 27 Dec 2017 16:11:23 GMT
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, DELETE, PUT
< Access-Control-Allow-Headers: Content-Type
< Content-Type: text/html; charset=ISO-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 323
< Connection: close
< Server: Jetty(9.2.9.v20150224)
< 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 500 Internal Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /validator/debug. Reason:
<pre>    Internal Server Error</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

only badge thing works fine:

curl -v -o nul http://online.swagger.io/validator?url=https://raw.githubusercontent.com/fnproject/fn/master/docs/swagger.yml

status code is 200 OK

Please note, we'd like to have swagger validation in CI but we don't like swagger tool docker image because it's 0.5Gb meanwhile swagger tool binary is only ~2Mb.