{"id":26472928,"url":"https://github.com/usabilla/openapi3-validator","last_synced_at":"2025-03-19T21:50:23.305Z","repository":{"id":25832674,"uuid":"106276621","full_name":"usabilla/openapi3-validator","owner":"usabilla","description":"Validator for OpenAPI v3 specs ","archived":false,"fork":false,"pushed_at":"2022-08-26T13:27:00.000Z","size":49,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T23:59:13.291Z","etag":null,"topics":["api","automation","open-source","openapi","tooling","validation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usabilla.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}},"created_at":"2017-10-09T11:46:40.000Z","updated_at":"2022-05-10T14:27:56.000Z","dependencies_parsed_at":"2022-08-07T11:16:03.566Z","dependency_job_id":null,"html_url":"https://github.com/usabilla/openapi3-validator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usabilla%2Fopenapi3-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usabilla%2Fopenapi3-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usabilla%2Fopenapi3-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usabilla%2Fopenapi3-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usabilla","download_url":"https://codeload.github.com/usabilla/openapi3-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244513916,"owners_count":20464601,"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","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":["api","automation","open-source","openapi","tooling","validation"],"created_at":"2025-03-19T21:50:22.662Z","updated_at":"2025-03-19T21:50:23.299Z","avatar_url":"https://github.com/usabilla.png","language":"Python","readme":"# OpenAPI v3 Validator\n\nThis is essentially a docker image that runs\nhttps://github.com/p1c2u/openapi-spec-validator and can be plugged into CI\nservers or even be used during development.\n\nIt's still being improved, but it already helps us to ensure that our API specs\nare actually following the [OpenAPI\nspecification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md).\n\n## Usage\n\nFirst you need to pull the image from [Docker Hub](https://hub.docker.com):\n\n```sh\ndocker pull usabillabv/openapi3-validator\n```\n\nThe validator can be run with the following arguments:\n```sh\nusage: main.py [-h] (-f FILE | -u URL | -p LOOKUP_PATH) [-n SPEC_NAME] [-i]\n\nOpen API spec validation tool\n\noptions:\n  -h, --help            show this help message and exit\n  -f FILE, --file FILE  full path to open api spec file, multiple arguments are supported\n  -u URL, --url URL     uri to open api spec, multiple arguments are supported\n  -p LOOKUP_PATH, --lookup-path LOOKUP_PATH\n                        open api spec files lookup path\n  -n SPEC_NAME, --spec-name SPEC_NAME\n                        open api spec file name, multiple arguments are supported. Used in conjunction with --lookup-path option. Default value:\n                        *openapi.yml,*openapi.yaml\n  -i, --ignore-missing-spec\n                        do not fail processing if spec file is missing. Used in conjunction with --lookup-path option.                     \n```\n\nThen you can use it to validate specs available on a shared volume.\n\n### Validate spec file(s) by the full path\n\n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator --file \u003cpath to the first file\u003e --file \u003cpath to the second file\u003e\n```\nor\n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator -f \u003cpath to the first file\u003e -f \u003cpath to the second file\u003e\n```\n\n### Lookup and validate spec file(s):\n\nThe tool will search for _openapi.yaml_ spec file by default in the provided path tree: \n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator --path /project\n```\nor you can provide specific spec file name(s) for lookup with a support of wildcards: \n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator --path /project --spec-name *-open-api-*.yaml --spec-name other-file.yaml\n```\nor\n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator -p /project -n *-open-api-*.yaml -n other-file.yaml\n```\n\n### Validate spec file via url(s)\n\n```sh\n$ docker run -it --rm usabillabv/openapi3-validator --url \u003cfirst url\u003e --url \u003csecond url\u003e\n```\nor\n```sh\n$ docker run -it --rm usabillabv/openapi3-validator -u \u003curl\u003e\n```\n\nOptionally you can create an alias and just use it, like:\n\n```sh\n$ alias openapi3-validate='docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator'\n$ openapi3-validate \u003cany available args\u003e\n```\n\n## Legacy mode usage\n\nValidate specs available on a shared volume:\n```sh\n$ docker run -it --rm -v $(pwd):/project -w /project usabillabv/openapi3-validator \u003cpath to your file\u003e\n```\nOr available via an HTTP(s) endpoint:\n```sh\n$ docker run -it --rm usabillabv/openapi3-validator \u003curi\u003e\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusabilla%2Fopenapi3-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusabilla%2Fopenapi3-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusabilla%2Fopenapi3-validator/lists"}