{"id":36441947,"url":"https://github.com/mnf-group/openapimux","last_synced_at":"2026-01-11T21:59:51.557Z","repository":{"id":57491629,"uuid":"193996898","full_name":"mnf-group/openapimux","owner":"mnf-group","description":"Open API router in go","archived":false,"fork":false,"pushed_at":"2021-10-14T03:32:25.000Z","size":10,"stargazers_count":22,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-14T00:36:45.019Z","etag":null,"topics":["go","golang","openapi","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","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/mnf-group.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":"2019-06-27T00:45:48.000Z","updated_at":"2023-08-14T14:37:21.000Z","dependencies_parsed_at":"2022-08-30T23:22:13.938Z","dependency_job_id":null,"html_url":"https://github.com/mnf-group/openapimux","commit_stats":null,"previous_names":["mnfgroup/openapimux"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mnf-group/openapimux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnf-group%2Fopenapimux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnf-group%2Fopenapimux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnf-group%2Fopenapimux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnf-group%2Fopenapimux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnf-group","download_url":"https://codeload.github.com/mnf-group/openapimux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnf-group%2Fopenapimux/sbom","scorecard":{"id":654917,"data":{"date":"2025-08-11","repo":{"name":"github.com/mnf-group/openapimux","commit":"fabb66311bf6cd698db5f7c2cbf5199383a05d1a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Code-Review","score":2,"reason":"Found 1/5 approved changesets -- score normalized to 2","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":"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":-1,"reason":"No tokens found","details":null,"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 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"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3533 / GHSA-wq9g-9vfc-cfq9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T14:23:49.346Z","repository_id":57491629,"created_at":"2025-08-21T14:23:49.346Z","updated_at":"2025-08-21T14:23:49.346Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: 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","openapi","openapi3","swagger"],"created_at":"2026-01-11T21:59:51.081Z","updated_at":"2026-01-11T21:59:51.544Z","avatar_url":"https://github.com/mnf-group.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPIMux\nOpenAPIMux is a \"schema-first\" HTTP router. It takes one or multiple\n[OpenAPI  (Swagger)](https://swagger.io/specification/) schema files as an input\nand then matches, validates and handles all incoming HTTP based on these schemas.\nUnder the hood, it uses [kin-openapi](https://github.com/getkin/kin-openapi/) for\nOpenAPI schema parsing and validation.\n\n# Motivation\nOpenAPI offers a great way of documenting API. However, none of\n[existing go routers](https://github.com/avelino/awesome-go#routers) offers\n\"schema first\" approach. In each router, you need to initialize a list of available\nroutes and then do the request validation manually. OpenAPIMux fills this gap by\nallowing to initialize a router directly from the OpenAPI schema definition file.\n\n# Features\n* Works with both OpenAPI 3.0 and OpenAPI 2.0 (aka Swagger). As well as both json and yaml schemas\n* Multiple OpenAPI schema files can be used at the same router to support API versioning\n* Implements `http.Handler` interface, so it is compatible with the standard http.ServeMux\n* Supports global level `http.Handler` middlewares, so it is compatible with third-party middlewares\n* Supports custom error handler for more control\n\n# Routing\n* `operationId` attribute of an OpenAPI path is used to resolve it to an appropriate handler\n* OpenAPIMux can encapsulate one or more swagger routers. Each router could\nbe created from an OpenAPI schema file or directly as a swagger object\n* To handle multiple versions, use the `servers.url` attribute in OpenAPI schema. Eg\n ```yaml\n servers:\n  - url: \"/v1.2\"\n```\n* When finding a matching route, routers with `servers` attribute set take priority\n\n# Install\n`go get -u github.com/MNFGroup/openapimux`\n\n# Full Example\nAssuming `openapi.yaml` has the following schema\n```yaml\nopenapi: 3.0.0\n\npaths:\n  /foo:\n    get:\n      operationId: getFoo\n```\n\nIt will create and start a server on 8080\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/go-chi/chi/middleware\"\n)\n\ntype fooHandler struct{}\n\nfunc (f fooHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprint(w, \"Hello\")\n}\n\nfunc main() {\n\tr, err := NewRouter(\"./openapi.yaml\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tr.UseHandlers(map[string]http.Handler{\n\t\t\"getFoo\": fooHandler{},\n\t})\n\n\tr.UseMiddleware(\n\t\tmiddleware.Recoverer,\n\t\tmiddleware.RequestID,\n\t\tmiddleware.DefaultCompress,\n\t)\n\n\tr.ErrorHandler = func(w http.ResponseWriter, r *http.Request, data string, code int) {\n\t\tw.WriteHeader(code)\n\t\tif code == http.StatusInternalServerError {\n\t\t\tfmt.Println(\"Fatal:\", data)\n\t\t\tw.Write([]byte(\"Oops\"))\n\t\t} else {\n\t\t\tw.Write([]byte(data))\n\t\t}\n\t}\n\n\tlog.Fatal(http.ListenAndServe(\":8080\", r))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnf-group%2Fopenapimux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnf-group%2Fopenapimux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnf-group%2Fopenapimux/lists"}