{"id":23036120,"url":"https://github.com/wndhydrnt/openapi-go-server","last_synced_at":"2026-05-04T05:45:42.862Z","repository":{"id":73880112,"uuid":"219166478","full_name":"wndhydrnt/openapi-go-server","owner":"wndhydrnt","description":"Templates for the go-server generator of the OpenAPI Generator.","archived":false,"fork":false,"pushed_at":"2019-11-02T14:48:17.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:42:33.183Z","etag":null,"topics":["go","golang","openapi","openapi-generator","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/wndhydrnt.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}},"created_at":"2019-11-02T14:36:54.000Z","updated_at":"2022-12-30T07:07:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb5d1794-d6eb-46b2-ae53-4465be203afc","html_url":"https://github.com/wndhydrnt/openapi-go-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wndhydrnt/openapi-go-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wndhydrnt%2Fopenapi-go-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wndhydrnt%2Fopenapi-go-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wndhydrnt%2Fopenapi-go-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wndhydrnt%2Fopenapi-go-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wndhydrnt","download_url":"https://codeload.github.com/wndhydrnt/openapi-go-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wndhydrnt%2Fopenapi-go-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32596533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["go","golang","openapi","openapi-generator","openapi3","swagger"],"created_at":"2024-12-15T16:48:26.857Z","updated_at":"2026-05-04T05:45:42.846Z","avatar_url":"https://github.com/wndhydrnt.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-go-server\n\nTemplates for the go-server generator of the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator).\n\nThe templates are a fork of the [original go-server generator](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/go-server) templates.\n\n## Features and Changes\n\n* Enable [DisallowUnknownFields](https://golang.org/pkg/encoding/json/#Decoder.DisallowUnknownFields) on JSON decoder\n* Optionally set response code and body on error\n* Remove request logging\n* Optionally set a logger to log errors in Controllers\n* Pass context of the incoming `http.Request` to methods of a Service\n* Let methods of a Service return types\n\n## Known Caveats\n\n* Supports only one return type on methods of a Service\n* Supports JSON encoding of response body only\n\n## Example\n\nSee [examples/petstore](examples/petstore).\n\n## Usage\n\n```\ncurl -L -o openapi-go-server.zip https://github.com/wndhydrnt/openapi-go-server/archive/master.zip\nunzip openapi-go-server.zip\nrm openapi-go-server.zip\nmv openapi-go-server-master/go-server .\nrm -rf openapi-go-server-master/\nopenapi-generator generate -i https://petstore.swagger.io/v2/swagger.json -o . --generator-name go-server --additional-properties=sourceFolder=api,packageName=api -t ./go-server\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwndhydrnt%2Fopenapi-go-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwndhydrnt%2Fopenapi-go-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwndhydrnt%2Fopenapi-go-server/lists"}