{"id":21423116,"url":"https://github.com/orsinium-labs/valdo","last_synced_at":"2025-10-13T08:39:23.486Z","repository":{"id":264048254,"uuid":"809004064","full_name":"orsinium-labs/valdo","owner":"orsinium-labs","description":"✅ Go package for validating JSON. It's the first Go package that can generate JSON Schema (OpeanAPI-compatible), produces user-friendly errors, and supports translations.","archived":false,"fork":false,"pushed_at":"2025-05-01T11:30:30.000Z","size":118,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-15T15:39:42.143Z","etag":null,"topics":["go","golang","json","jsonschema","openapi","openapi3","validation","validator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/orsinium-labs.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-06-01T12:09:15.000Z","updated_at":"2025-05-01T11:30:26.000Z","dependencies_parsed_at":"2024-11-21T18:25:19.380Z","dependency_job_id":"92b1cf3b-2b07-40ca-a02d-ce8b2277b500","html_url":"https://github.com/orsinium-labs/valdo","commit_stats":null,"previous_names":["orsinium-labs/valdo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/orsinium-labs/valdo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fvaldo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fvaldo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fvaldo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fvaldo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsinium-labs","download_url":"https://codeload.github.com/orsinium-labs/valdo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fvaldo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014323,"owners_count":26085492,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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","json","jsonschema","openapi","openapi3","validation","validator"],"created_at":"2024-11-22T21:14:11.194Z","updated_at":"2025-10-13T08:39:23.472Z","avatar_url":"https://github.com/orsinium-labs.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# valdo\n\n[ [📚 docs](https://pkg.go.dev/github.com/orsinium-labs/valdo/valdo) ] [ [🐙 github](https://github.com/orsinium-labs/valdo) ]\n\nGo package for validating JSON. Can generate [JSON Schema](https://json-schema.org/overview/what-is-jsonschema) (100% compatible with [OpenAPI](https://swagger.io/specification/)), produces user-friendly errors, supports translations.\n\nYou could write OpenAPI documentation by hand (which is very painfull) and then use it to validate user input in your HTTP service, but then error messages are very confusing, not user-friendly, and only in English. Or you could write input validaion by hand and then maintain the OpenAPI documentation separately but then the two will eventually drift and your documentaiton will be a lie. Valdo solves all these problems: write validation once using a real programming language, use it everywhere.\n\nFeatures:\n\n* Mechanism to translate error messages.\n* Out-of-the-box translations for some languages.\n* Supports the latest JSON Schema specification (2020-12).\n* Pure Go.\n* No code generation, no reflection, no unsafe code.\n* User-freindly error messages.\n* Concurrency-safe, no global state.\n* Strict by default, without imlicit type casting.\n* Type-safe, thanks to generics.\n\n## Installation\n\n```bash\ngo get github.com/orsinium-labs/valdo\n```\n\n## Usage\n\n```go\nvalidator := valdo.Object(\n    valdo.Property(\"name\", valdo.String(valdo.MinLen(1))),\n    valdo.Property(\"admin\", valdo.Bool()),\n)\n\n// validate JSON\ninput := []byte(`{\"name\": \"aragorn\", \"admin\": true}`)\nerr := valdo.Validate(validator, raw)\n\n// validate and unmarshal JSON\ntype User struct {\n    Name  string `json:\"name\"`\n    Admin bool   `json:\"admin\"`\n}\nuser, err := valdo.Unmarshal[User](validator, input)\n\n// generate JSON Schema\nschema := valdo.Schema(validator)\n```\n\nSee [documentation](https://pkg.go.dev/github.com/orsinium-labs/valdo/valdo) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Fvaldo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsinium-labs%2Fvaldo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Fvaldo/lists"}