{"id":13819120,"url":"https://github.com/openapi-ui/go-openapi-ui","last_synced_at":"2025-07-21T07:33:25.348Z","repository":{"id":235048129,"uuid":"789964664","full_name":"openapi-ui/go-openapi-ui","owner":"openapi-ui","description":"go-openapi-ui is an embedded OpenAPI/Swagger documentation ui for Go using OpenAPI-UI","archived":false,"fork":false,"pushed_at":"2024-11-12T09:08:30.000Z","size":3901,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T01:52:38.391Z","etag":null,"topics":["echo-openapi","echo-swagger","fiber-openapi","fiber-swagger","gin-openapi","gin-swagger","go-openapi","go-openapi-ui","go-swagger","openapi","openapi-ui","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"https://openapi-ui.vercel.app/service/findPetsByStatus?serviceURL=https%3A%2F%2Fpetstore3.swagger.io%2Fapi%2Fv3%2Fopenapi.json\u0026importModeType=url","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/openapi-ui.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":"2024-04-22T02:20:31.000Z","updated_at":"2025-06-27T07:07:12.000Z","dependencies_parsed_at":"2024-04-25T15:28:36.943Z","dependency_job_id":"c78ebb7a-c81f-44ad-af9b-054557f0faaf","html_url":"https://github.com/openapi-ui/go-openapi-ui","commit_stats":null,"previous_names":["rookie-luochao/go-openapi-ui","openapi-ui/go-openapi-ui"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/openapi-ui/go-openapi-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-ui%2Fgo-openapi-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-ui%2Fgo-openapi-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-ui%2Fgo-openapi-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-ui%2Fgo-openapi-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openapi-ui","download_url":"https://codeload.github.com/openapi-ui/go-openapi-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-ui%2Fgo-openapi-ui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261308,"owners_count":23901288,"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":["echo-openapi","echo-swagger","fiber-openapi","fiber-swagger","gin-openapi","gin-swagger","go-openapi","go-openapi-ui","go-swagger","openapi","openapi-ui","swagger","swagger-ui"],"created_at":"2024-08-04T08:00:40.622Z","updated_at":"2025-07-21T07:33:20.337Z","avatar_url":"https://github.com/openapi-ui.png","language":"Go","readme":"# go-openapi-ui\n\n`go-openapi-ui` is an embedded OpenAPI documentation ui for Go using [OpenAPI-UI](https://github.com/rookie-luochao/openapi-ui) and Go's [1.17+'s embed package](https://golang.org/pkg/embed/), with middleware implementations for: `net/http`, `gin`, `fiber`, and `echo`.\n\nThe template is based on the OpenAPI-UI [bundle.js](https://github.com/rookie-luochao/openapi-ui/blob/master/lib/openapi-ui.umd.js) with the script already placed in the html instead of depending on a CDN.\n\nThis package does not generate openapi spec file. Check [this example](https://github.com/swaggo/swag/tree/master/example) for using code generation with swag.\n\n## Usage\n\n```go\nimport \"github.com/openapi-ui/go-openapi-ui/pkg/doc\"\n\n...\n\ndoc := doc.Doc{\n    Title:       \"Example API\",\n    Description: \"Example API Description\",\n    SpecFile:    \"./openapi.json\", // \"./openapi.yaml\"\n    SpecPath:    \"/openapi.json\",  // \"/openapi.yaml\"\n    DocsPath:    \"/docs\",\n    Theme:       \"light\", // default is light, support light or dark\n}\n```\n\n- `net/http`\n\n```go\nimport (\n\t\"net/http\"\n\t\"github.com/openapi-ui/go-openapi-ui/pkg/doc\"\n)\n\n...\n\nhttp.ListenAndServe(address, doc.Handler())\n```\n\n- `gin`\n\n```go\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openapi-ui/go-openapi-ui/pkg/doc\"\n\tginopenapiui \"github.com/openapi-ui/go-openapi-ui/pkg/middleware/gin\"\n)\n\n...\n\nr := gin.New()\nr.Use(ginopenapiui.New(doc))\n```\n\n- `echo`\n\n```go\nimport (\n\t\"github.com/labstack/echo/v4\"\n\t\"github.com/openapi-ui/go-openapi-ui/pkg/doc\"\n\techoopenapiui \"github.com/openapi-ui/go-openapi-ui/pkg/middleware/echo\"\n)\n\n...\n\nr := echo.New()\nr.Use(echoopenapiui.New(doc))\n```\n\n- `fiber`\n\n```go\nimport (\n\t\"github.com/gofiber/fiber/v2\"\n\t\"github.com/openapi-ui/go-openapi-ui/pkg/doc\"\n\tfiberopenapiui \"github.com/openapi-ui/go-openapi-ui/pkg/middleware/fiber\"\n)\n\n...\n\nr := fiber.New()\nr.Use(fiberopenapiui.New(doc))\n```\n\nSee [examples](/_examples)\n\n## Thanks\n\n- [go-redoc](https://github.com/mvrilo/go-redoc)\n\n## LICENSE\n\n[MIT](LICENSE)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi-ui%2Fgo-openapi-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapi-ui%2Fgo-openapi-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi-ui%2Fgo-openapi-ui/lists"}