{"id":13456870,"url":"https://github.com/swagger-api/validator-badge","last_synced_at":"2026-02-09T13:15:45.567Z","repository":{"id":19837637,"uuid":"23099185","full_name":"swagger-api/validator-badge","owner":"swagger-api","description":"Validate your Swagger JSON/YAML today!","archived":false,"fork":false,"pushed_at":"2025-05-19T23:28:25.000Z","size":426,"stargazers_count":214,"open_issues_count":50,"forks_count":84,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-28T21:48:58.377Z","etag":null,"topics":["open-source","openapi-specification","openapi3","rest","restful-api","swagger","swagger-api","swagger-oss","validator-badge"],"latest_commit_sha":null,"homepage":"http://swagger.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swagger-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-19T06:18:38.000Z","updated_at":"2025-05-19T07:23:28.000Z","dependencies_parsed_at":"2023-11-06T14:38:22.880Z","dependency_job_id":"9cf8c220-5d1c-4ee3-8b87-2bf52ee46d30","html_url":"https://github.com/swagger-api/validator-badge","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/swagger-api/validator-badge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fvalidator-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fvalidator-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fvalidator-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fvalidator-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swagger-api","download_url":"https://codeload.github.com/swagger-api/validator-badge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fvalidator-badge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278599590,"owners_count":26013511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["open-source","openapi-specification","openapi3","rest","restful-api","swagger","swagger-api","swagger-oss","validator-badge"],"created_at":"2024-07-31T08:01:29.292Z","updated_at":"2026-02-09T13:15:45.560Z","avatar_url":"https://github.com/swagger-api.png","language":"Java","readme":"# Swagger Validator Badge \u003cimg src=\"https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SW-logo-clr.png\" height=\"50\" align=\"right\"\u003e\n\n[![Build Status](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-validator-badge-master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-validator-badge-master)\n\nThis project shows a \"valid swagger\" badge on your site, supporting Swagger/OpenAPI 2.0 and OpenAPI 3.x specifications.  \n\nThere is an online version hosted on http://validator.swagger.io.  \n\n### Using Docker\n\nYou can also pull a docker image of the validator directly from [DockerHub](https://hub.docker.com/r/swaggerapi/swagger-validator-v2/), e.g.:\n\n```\ndocker pull swaggerapi/swagger-validator-v2:v2.1.9\ndocker run -it -p 8080:8080 --name swagger-validator-v2 swaggerapi/swagger-validator-v2:v2.1.9\n```\n\nSince version `2.0.2` local and non http/https urls are rejected by default, along with redirects; this is controllable with docker env variables / java system properties:\n\n```\ndocker run -it -p 8080:8080 -e \"REJECT_LOCAL=false\" -e \"REJECT_REDIRECT=false\" --name swagger-validator-v2 swaggerapi/swagger-validator-v2:v2.1.9\n```\n\nIn non docker environments, system properties `rejectLocal` and `rejectRedirect` can be used.\n\n\n\nWeb UI is reachable at http://localhost:8080/index.html and OpenAPI spec at http://localhost:8080/validator/openapi.json\n\n\n\nYou can validate OpenAPI specifications version 2.0 (Swagger), 3.0 and 3.1. [Swagger Parser](https://github.com/swagger-api/swagger-parser/blob/master/README.md) is used for semantic validation.\nDepending on `jsonSchemaValidation` query parameter value also JSON Schema validation can be executed (default to `true`) \n\nAdditional parameters allow to customize parsing and validation mode.\n\n```\n\u003cimg src=\"https://validator.swagger.io/validator?url={YOUR_URL}\"\u003e\n```\n\nOf course the `YOUR_URL` needs to be addressable by the validator (i.e. won't find anything on localhost).  If it validates, you'll get a nice green VALID logo.  Failures will give an INVALID logo, and if there are errors parsing the specification or reaching it, an ugly red ERROR logo.\n\nFor example, using [https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-expanded.json](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-expanded.json) as a source, we get ...\n\n![](https://validator.swagger.io/validator?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-expanded.json)\n\nIf your specification fails to validate for some reason, or if there is an error, you can get more information on why by visiting ```https://validator.swagger.io/validator/debug?url={YOUR_URL}```.\n\nSince the validator uses a browserless back-end to fetch the contents and schema, it's not subject to the terrible world of CORS.\n\n### Using cURL\n\nYou can also post a spec up to the service with cURL:\n\n```bash\ncurl -X POST -d @swagger.json -H 'Content-Type:application/json' https://validator.swagger.io/validator/debug\n```\n\nIn this example, `swagger.json` is the swagger definition in JSON format, in the CWD.\n\nIf your swagger definition file is in YAML format, the command needs to be adapted like so:\n\n```bash\ncurl --data-binary @swagger.yaml -H 'Content-Type:application/yaml' https://validator.swagger.io/validator/debug\n```\n\nNote the use of `--data-binary` to avoid stripping newlines, along with a different `Content-Type` header.\n\n### Note\n\nAll of the above is also applicable to OpenAPI 3.x specifications; for example, using [https://petstore3.swagger.io/api/v3/openapi.json](https://petstore3.swagger.io/api/v3/openapi.json) as a source, we get ...\n\n![](https://validator.swagger.io/validator?url=https://petstore3.swagger.io/api/v3/openapi.json)\n\nSince version 2.1.0 a `/parseByUrl` and `/parseByContent` are available, returning a serialized parsed specification, with parsing and result configurable by\nparameters, e.g. passing `resolve`, etc. See [Swagger Parser](https://github.com/swagger-api/swagger-parser/blob/master/README.md#options).\n\n### Running locally\n\nYou can build and run the validator locally:\n\n```bash\nmvn package jetty:run\n```\n\nAnd access the validator like such:\n\n```\nhttp://localhost:8080/validator?url={URL}\n```\n\nor\n\n```\nhttp://localhost:8080/validator?url=http://petstore.swagger.io/v2/swagger.json\n```\n```\nhttp://localhost:8080/validator?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n```\n\n## Security contact\n\nPlease disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.\n","funding_links":[],"categories":["Java","By Category"],"sub_categories":["Tools and Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fvalidator-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagger-api%2Fvalidator-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fvalidator-badge/lists"}