swagger-api / swagger-api/validator-badge

Long response times when validating

Open
#101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
227
Forks
81
Avg merge
2h 3m
Merged PRs (30d)
1

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the curl request from inside the Docker image, comparing validation of the internal Swagger URL with validation without a URL. Inspect the validator's URL-fetching and timeout behavior; done means the internal resource is handled without an unexplained two-minute delay, or a prompt and clear failure is returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, openapi
Domain
api, backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.