{"id":14987683,"url":"https://github.com/meteran/gnext","last_synced_at":"2025-06-30T09:35:56.315Z","repository":{"id":40572801,"uuid":"434389055","full_name":"meteran/gnext","owner":"meteran","description":"Web Framework extension for Gin. Offers the API structuring, automates validation and generates documentation. It's fully compatible with the current Gin usages and Gin's middlewares.","archived":false,"fork":false,"pushed_at":"2023-09-11T13:07:29.000Z","size":22847,"stargazers_count":70,"open_issues_count":5,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-21T06:43:10.526Z","etag":null,"topics":["api","docs","fast","framework","gin","gin-gonic","gnext","go","golang","http","library","middleware","openapi3","server","swagger","web"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/meteran/gnext","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/meteran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2021-12-02T22:07:56.000Z","updated_at":"2025-01-28T16:06:49.000Z","dependencies_parsed_at":"2024-06-19T19:05:03.419Z","dependency_job_id":"d1dc61c1-da5b-43e8-bddf-626dbd6f48d0","html_url":"https://github.com/meteran/gnext","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/meteran/gnext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteran%2Fgnext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteran%2Fgnext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteran%2Fgnext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteran%2Fgnext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meteran","download_url":"https://codeload.github.com/meteran/gnext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteran%2Fgnext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262748423,"owners_count":23358194,"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":["api","docs","fast","framework","gin","gin-gonic","gnext","go","golang","http","library","middleware","openapi3","server","swagger","web"],"created_at":"2024-09-24T14:15:10.553Z","updated_at":"2025-06-30T09:35:56.293Z","avatar_url":"https://github.com/meteran.png","language":"Go","readme":"# gNext Web Framework\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/meteran/gnext)](https://goreportcard.com/report/github.com/meteran/gnext)\n[![GoDoc](https://pkg.go.dev/badge/github.com/meteran/gnext?status.svg)](https://pkg.go.dev/github.com/meteran/gnext?tab=doc)\n[![Release](https://img.shields.io/github/release/meteran/gnext.svg?style=flat-square)](https://github.com/meteran/gnext/releases)\n\ngNext is a Golang API-focused framework extending [Gin](https://github.com/gin-gonic/gin). Offers the API\nstructuring, automates validation and generates documentation. It's compatible with the existing Gin handlers and Gin\nmiddlewares. Designed to simplify and boost development of JSON APIs. You can leave generic and boring stuff to gNext\nand purely focus on the business logic.\n\n## Contents\n\n- [gNext Web Framework](#gnext-web-framework)\n    - [Contents](#contents)\n    - [Installation](#installation)\n    - [Quick start](#quick-start)\n- [Documentation](https://meteran.github.io/gnext/documentation/site/)\n\n## Installation\n\nYou can download gNext and install it in your project by running:\n\n```shell\ngo get -u github.com/meteran/gnext\n```\n\n## Quick start\n\nThis tutorial assumes, that you already have Golang installation and basic knowledge about how to build and run Go\nprograms. If this is your first hit with Go, and you feel you have no idea what is happening here, please read how\nto [get started with Go](https://go.dev/doc/tutorial/getting-started).\n\nOk, so let's create a project:\n\n```shell\nmkdir gnext-example\ncd gnext-example\ngo mod init example.com/gnext\ngo get github.com/meteran/gnext\n```\n\nCreate a file `example.go` and fill it up with the following code:\n\n```go\npackage main\n\nimport \"github.com/meteran/gnext\"\n\nfunc main() {\n\tr := gnext.Router()\n\n\tr.GET(\"/example\", func() string {\n\t\treturn \"Hello World!\"\n\t})\n\n\t_ = r.Run()\n}\n```\n\nRun it:\n\n```shell\ngo run example\n```\n\nNow you can visit this link in your browser: http://localhost:8080/example\n\nYes, yes... of course it works, but that's boring... Let's open this page: http://localhost:8080/docs\n\nWhoa, that was amazing, ...but not very useful.\n\nLet's try some real example. With request and response. We can modify our handler to use structures:\n\n```go\npackage main\n\nimport \"github.com/meteran/gnext\"\n\nfunc main() {\n\tr := gnext.Router()\n\n\tr.POST(\"/example\", handler)\n\t_ = r.Run()\n}\n\ntype MyRequest struct {\n\tId   int    `json:\"id\" binding:\"required\"`\n\tName string `json:\"name\"`\n}\n\ntype MyResponse struct {\n\tResult string `json:\"result\"`\n}\n\nfunc handler(req *MyRequest) *MyResponse {\n\treturn \u0026MyResponse{Result: req.Name}\n}\n```\n\nRestart the server and visit the docs page. You can see that request and response of `POST /example` endpoint are\ndocumented. That's the real power!\n\nThe POST request without required `id` now fails with the validation error:\n\n```shell\ncurl --request POST http://localhost:8080/example --data '{\"name\": \"some name\"}'\n```\n\ngives output:\n\n```json\n{\n  \"message\": \"validation error\",\n  \"details\": [\n    \"field validation for 'id' failed on the 'required' tag with value ''\"\n  ],\n  \"success\": false\n}\n```\n\nthe valid request:\n\n```shell\ncurl --request POST http://localhost:8080/example --data '{\"name\": \"some name\", \"id\": 4}'\n```\n\ngives us the expected response:\n\n```json\n{\n  \"result\": \"some name\"\n}\n```\n\nCongratulations! Now you are prepared for the fast forwarding development of your great API.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteran%2Fgnext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteran%2Fgnext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteran%2Fgnext/lists"}