{"id":22983062,"url":"https://github.com/joeriddles/goalesce","last_synced_at":"2026-03-20T00:09:41.417Z","repository":{"id":249698008,"uuid":"831206390","full_name":"joeriddles/goalesce","owner":"joeriddles","description":"Generate OpenAPI CRUD routes from GORM models","archived":false,"fork":false,"pushed_at":"2024-10-31T22:33:11.000Z","size":8229,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T02:45:47.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeriddles.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":"2024-07-19T23:25:56.000Z","updated_at":"2024-10-31T22:33:15.000Z","dependencies_parsed_at":"2024-10-31T23:21:40.254Z","dependency_job_id":"76fc756d-c2a3-4b86-9712-8d20e50c613b","html_url":"https://github.com/joeriddles/goalesce","commit_stats":null,"previous_names":["joeriddles/gorm_oapi_codegen","joeriddles/goalesce"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeriddles%2Fgoalesce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeriddles%2Fgoalesce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeriddles%2Fgoalesce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeriddles%2Fgoalesce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeriddles","download_url":"https://codeload.github.com/joeriddles/goalesce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794206,"owners_count":20834938,"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":[],"created_at":"2024-12-15T02:34:46.525Z","updated_at":"2026-03-20T00:09:41.390Z","avatar_url":"https://github.com/joeriddles.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goalesce\r\n\r\n`goalesce` is a command-line tool to generate OpenAPI CRUD routes from GORM models.\r\n\r\n---\r\n![Test workflow](https://github.com/joeriddles/goalesce/actions/workflows/test.yaml/badge.svg) ![Release workflow](https://github.com/joeriddles/goalesce/actions/workflows/release.yaml/badge.svg)\r\n\r\n## Features\r\n- Generate [OpenAPI YAML](https://swagger.io/specification/) files from [GORM](https://gorm.io/) model types\r\n- Generate CRUD paths for each GORM model\r\n- Generate controllers, mappers, and repositories for each GORM model\r\n- `goalesce` uses [`oapi-codegen`](https://github.com/oapi-codegen/oapi-codegen/) for generating server and controller interfaces\r\n\r\n## Install\r\n```shell\r\ngo install github.com/joeriddles/goalesce/cmd/goalesce@latest\r\n```\r\n\r\nGoalesce requires additional tooling to work correctly. \r\n- Ensure a modern version of [Node](https://nodejs.org) is installed (LTS+).\r\n- Ensure the `goimports` tool is also installed:\r\n\t- `go install golang.org/x/tools/cmd/goimports@latest`\r\n\r\n## Usage\r\n`goalesce` is largely configured using a YAML configuration file. Check out the GoDoc for [`Config`](https://pkg.go.dev/github.com/joeriddles/goalesce/pkg/config#Config) for more detail.\r\n\r\n\r\nExample:\r\n```yaml\r\n# ./config.yaml\r\ninput_folder_path: ./model\r\noutput_file_path: ./generated\r\nmodule_name: github.com/joeriddles/goalesce/examples/basic\r\nmodels_package: github.com/joeriddles/goalesce/examples/basic/model\r\nquery_package: github.com/joeriddles/goalesce/examples/basic/query\r\nclear_output_dir: true\r\n```\r\n\r\n```go\r\n// ./model/model.go\r\npackage model\r\n\r\nimport \"gorm.io/gorm\"\r\n\r\ntype User struct {\r\n\tgorm.Model\r\n\tName string `gorm:\"column:name;\"`\r\n}\r\n```\r\n\r\n```go\r\n// ./main.go\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/joeriddles/goalesce/examples/basic/model\"\r\n\t\"gorm.io/gen\"\r\n)\r\n\r\nfunc main() {\r\n\tg := gen.NewGenerator(gen.Config{\r\n\t\tOutPath: \"query\",\r\n\t\tMode:    gen.WithoutContext | gen.WithQueryInterface,\r\n\t})\r\n\tg.ApplyBasic(model.User{})\r\n\tg.Execute()\r\n}\r\n```\r\n\r\n```shell\r\n# Run GORM gen\r\n$ go run .\r\n# Run Goalesce gen\r\n$ goalesce -config config.yaml\r\n```\r\n\r\n## Releasing\r\n\r\nTo release a new change, simply run `rev-tag.sh` with the desired [semver](https://semver.org/) update: major, minor, or patch:\r\n\r\n```shell\r\n$ ./rev-tag.sh patch\r\n./rev-tag.sh patch\r\nOld tag: v1.0.1\r\nNew tag: v1.0.2\r\nCreated new tag v1.0.2\r\nDo you want to push this tag? y\r\nEnumerating objects: 4, done.\r\nCounting objects: 100% (4/4), done.\r\nDelta compression using up to 8 threads\r\nCompressing objects: 100% (3/3), done.\r\nWriting objects: 100% (3/3), 769 bytes | 769.00 KiB/s, done.\r\nTotal 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)\r\nremote: Resolving deltas: 100% (1/1), completed with 1 local object.\r\nTo https://github.com/joeriddles/goalesce.git\r\n * [new tag]         v1.0.2 -\u003e v1.0.2\r\n```\r\n\r\nThe shell script will create a new tag and push it to GitHub, which the [release](https://github.com/joeriddles/goalesce/blob/main/.github/workflows/release.yaml) workflow will detect and create a new release for.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeriddles%2Fgoalesce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeriddles%2Fgoalesce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeriddles%2Fgoalesce/lists"}