{"id":14986667,"url":"https://github.com/pb33f/libopenapi-validator","last_synced_at":"2026-02-27T00:08:36.894Z","repository":{"id":154011472,"uuid":"621782398","full_name":"pb33f/libopenapi-validator","owner":"pb33f","description":"OpenAPI validation extension for libopenapi, validate http requests and responses as well as schemas","archived":false,"fork":false,"pushed_at":"2026-02-23T16:24:04.000Z","size":1031,"stargazers_count":134,"open_issues_count":15,"forks_count":43,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-24T00:19:49.215Z","etag":null,"topics":["go","golang","http","openapi","openapi-spec","openapi-specification","openapi3","openapi3-1","openapi3-validation","openapi31","schema","validation","validator"],"latest_commit_sha":null,"homepage":"https://pb33f.io/libopenapi/validation/","language":"Go","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/pb33f.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-31T11:28:11.000Z","updated_at":"2026-02-23T16:23:40.000Z","dependencies_parsed_at":"2025-12-30T03:08:04.751Z","dependency_job_id":null,"html_url":"https://github.com/pb33f/libopenapi-validator","commit_stats":{"total_commits":178,"total_committers":11,"mean_commits":"16.181818181818183","dds":0.2303370786516854,"last_synced_commit":"696235ecd56ed0a28e34f28ae1e8ab3bf69eb0aa"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/pb33f/libopenapi-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb33f%2Flibopenapi-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb33f%2Flibopenapi-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb33f%2Flibopenapi-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb33f%2Flibopenapi-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pb33f","download_url":"https://codeload.github.com/pb33f/libopenapi-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb33f%2Flibopenapi-validator/sbom","scorecard":{"id":724680,"data":{"date":"2025-08-11","repo":{"name":"github.com/pb33f/libopenapi-validator","commit":"8660f370a75465c8f4cf5da2b7ddd34292dfd8d2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":4,"reason":"Found 5/11 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"16 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/pb33f/libopenapi-validator/build.yaml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/build.yaml:44","Warn: goCommand not pinned by hash: .github/workflows/build.yaml:51","Warn: goCommand not pinned by hash: .github/workflows/build.yaml:52","Warn: goCommand not pinned by hash: .github/workflows/build.yaml:53","Warn: goCommand not pinned by hash: .github/workflows/build.yaml:54","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   1 out of   5 goCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T12:25:10.590Z","repository_id":154011472,"created_at":"2025-08-22T12:25:10.591Z","updated_at":"2025-08-22T12:25:10.591Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","golang","http","openapi","openapi-spec","openapi-specification","openapi3","openapi3-1","openapi3-validation","openapi31","schema","validation","validator"],"created_at":"2024-09-24T14:13:18.558Z","updated_at":"2026-02-27T00:08:36.886Z","avatar_url":"https://github.com/pb33f.png","language":"Go","readme":"﻿\u003cp align=\"center\"\u003e\r\n\t\u003cimg src=\"libopenapi-logo.png\" alt=\"libopenapi\" height=\"300px\" width=\"450px\"/\u003e\r\n\u003c/p\u003e\r\n\r\n# Enterprise grade OpenAPI validation tools for golang.\r\n\r\n![Pipeline](https://github.com/pb33f/libopenapi-validator/workflows/Build/badge.svg)\r\n[![codecov](https://codecov.io/gh/pb33f/libopenapi-validator/branch/main/graph/badge.svg?)](https://codecov.io/gh/pb33f/libopenapi-validator)\r\n[![discord](https://img.shields.io/discord/923258363540815912)](https://discord.gg/x7VACVuEGP)\r\n[![Docs](https://img.shields.io/badge/godoc-reference-5fafd7)](https://pkg.go.dev/github.com/pb33f/libopenapi-validator)\r\n\r\nA validation module for [libopenapi](https://github.com/pb33f/libopenapi).\r\n\r\n`libopenapi-validator` will validate the following elements against an OpenAPI 3+ specification\r\n\r\n- *http.Request* - Validates the request against the OpenAPI specification\r\n- *http.Response* - Validates the response against the OpenAPI specification\r\n- *libopenapi.Document* - Validates the OpenAPI document against the OpenAPI specification\r\n- *base.Schema* - Validates a schema against a JSON or YAML blob / unmarshalled object\r\n\r\n👉👉 [Check out the full documentation](https://pb33f.io/libopenapi/validation/) 👈👈\r\n\r\n---\r\n\r\n## Installation\r\n\r\n```bash\r\ngo get github.com/pb33f/libopenapi-validator\r\n```\r\n\r\n## Validate OpenAPI Document\r\n\r\n```bash\r\ngo run github.com/pb33f/libopenapi-validator/cmd/validate@latest [--regexengine] [--yaml2json] \u003cfile\u003e\r\n```\r\n\r\n## Install pre-commit hook\r\n\r\nTo install the pre-commit hook, run the following command in your terminal:\r\n\r\n```bash\r\npre-commit install\r\n```\r\n\r\n### Options\r\n\r\n#### --regexengine\r\n🔍 Example: Use a custom regex engine/flag (e.g., ecmascript)\r\n```bash\r\ngo run github.com/pb33f/libopenapi-validator/cmd/validate@latest --regexengine=ecmascript \u003cfile\u003e\r\n```\r\n🔧 Supported **--regexengine** flags/values (ℹ️ Default: re2)\r\n- none\r\n- ignorecase\r\n- multiline\r\n- explicitcapture\r\n- compiled\r\n- singleline\r\n- ignorepatternwhitespace\r\n- righttoleft\r\n- debug\r\n- ecmascript\r\n- re2\r\n- unicode\r\n\r\n#### --yaml2json\r\n🔍 Convert YAML files to JSON before validation (ℹ️ Default: false)\r\n\r\n[libopenapi](https://github.com/pb33f/libopenapi/blob/main/datamodel/spec_info.go#L115) passes `map[interface{}]interface{}` structures for deeply nested objects or complex mappings in the OpenAPI specification, which are not allowed in JSON.\r\nThese structures cannot be properly converted to JSON by libopenapi and cannot be validated by jsonschema, resulting in ambiguous errors.\r\n\r\nThis flag allows pre-converting from YAML to JSON to bypass this limitation of the libopenapi.\r\n\r\n**When does this happen?**\r\n- OpenAPI specs with deeply nested schema definitions\r\n- Complex `allOf`, `oneOf`, or `anyOf` structures with multiple levels\r\n- Specifications with intricate object mappings in examples or schema properties\r\n\r\nEnabling this flag pre-converts the YAML document from YAML to JSON, ensuring a clean JSON structure before validation.\r\n\r\nExample:\r\n```bash\r\ngo run github.com/pb33f/libopenapi-validator/cmd/validate@latest --yaml2json \u003cfile\u003e\r\n```\r\n\r\n## Documentation\r\n\r\n- [The structure of the validator](https://pb33f.io/libopenapi/validation/#the-structure-of-the-validator)\r\n  - [Validation errors](https://pb33f.io/libopenapi/validation/#validation-errors)\r\n  - [Schema errors](https://pb33f.io/libopenapi/validation/#schema-errors)\r\n  - [High-level validation](https://pb33f.io/libopenapi/validation/#high-level-validation)\r\n- [Validating http.Request](https://pb33f.io/libopenapi/validation/#validating-httprequest)\r\n- [Validating http.Request and http.Response](https://pb33f.io/libopenapi/validation/#validating-httprequest-and-httpresponse)\r\n- [Validating just http.Response](https://pb33f.io/libopenapi/validation/#validating-just-httpresponse)\r\n- [Validating HTTP Parameters](https://pb33f.io/libopenapi/validation/#validating-http-parameters)\r\n- [Validating an OpenAPI document](https://pb33f.io/libopenapi/validation/#validating-an-openapi-document)\r\n- [Validating Schemas](https://pb33f.io/libopenapi/validation/#validating-schemas)\r\n\r\n[libopenapi](https://github.com/pb33f/libopenapi) and [libopenapi-validator](https://github.com/pb33f/libopenapi-validator) are\r\nproducts of Princess Beef Heavy Industries, LLC\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb33f%2Flibopenapi-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpb33f%2Flibopenapi-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb33f%2Flibopenapi-validator/lists"}