swagger-api / swagger-api/validator-badge
Broken online validation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 227
- Forks
- 81
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README instructions and the example spec at docs/swagger.yml, then reproduce POST requests to /validator/debug and the working /validator endpoint. Trace the online validation path to determine why content validation returns HTTP 500. Done means the content-validation methods accept the documented request and provide a usable result for CI.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100