{"id":19368574,"url":"https://github.com/ghusta/retrofit-converter-validation","last_synced_at":"2026-06-12T06:31:44.812Z","repository":{"id":148621147,"uuid":"597766401","full_name":"ghusta/retrofit-converter-validation","owner":"ghusta","description":"Retrofit 2 Converter for Bean Validation","archived":false,"fork":false,"pushed_at":"2025-08-21T22:03:27.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T23:49:07.062Z","etag":null,"topics":["bean-validation","retrofit2"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ghusta.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","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":"2023-02-05T15:25:46.000Z","updated_at":"2024-04-30T18:50:52.000Z","dependencies_parsed_at":"2023-05-20T17:30:38.806Z","dependency_job_id":"f45d921a-3c41-46ff-84fe-989d601d5a02","html_url":"https://github.com/ghusta/retrofit-converter-validation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ghusta/retrofit-converter-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghusta%2Fretrofit-converter-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghusta%2Fretrofit-converter-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghusta%2Fretrofit-converter-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghusta%2Fretrofit-converter-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghusta","download_url":"https://codeload.github.com/ghusta/retrofit-converter-validation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghusta%2Fretrofit-converter-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34232789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["bean-validation","retrofit2"],"created_at":"2024-11-10T08:07:03.065Z","updated_at":"2026-06-12T06:31:44.789Z","avatar_url":"https://github.com/ghusta.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Retrofit 2 Converter for Bean Validation\n\nimage:https://github.com/ghusta/retrofit-converter-validation/actions/workflows/maven.yml/badge.svg[Java CI with Maven,link=https://github.com/ghusta/retrofit-converter-validation/actions/workflows/maven.yml]\nimage:https://img.shields.io/github/v/release/ghusta/retrofit-converter-validation?sort=semver\u0026logo=GitHub[GitHub release,link=https://github.com/ghusta/retrofit-converter-validation/releases]\nimage:https://img.shields.io/maven-central/v/io.github.ghusta.retrofit2/retrofit-converter-validation.svg?label=Maven%20Central[Maven Central,link=https://search.maven.org/search?q=g:%22io.github.ghusta.retrofit2%22%20AND%20a:%22retrofit-converter-validation%22]\n\n== Overview\n\nThis library enables validating beans with https://beanvalidation.org/[Bean Validation] using https://square.github.io/retrofit/[Retrofit 2] thanks to its converter feature.\n\n== Getting started\n\n=== Add dependency\n\nWith Maven :\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.ghusta.retrofit2\u003c/groupId\u003e\n    \u003cartifactId\u003eretrofit-converter-validation\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n=== Configure Retrofit and add converters\n\nFor example :\n\n[source,java]\n----\nRetrofit retrofit = new Retrofit.Builder()\n    .baseUrl(\"https://api.github.com/\")\n    .addConverterFactory(ValidationConverterFactory.create())\n    .addConverterFactory(GsonConverterFactory.create())\n    .build();\n----\n\nNOTE: The declaration order of converters is important. `ValidationConverterFactory` must be declared before JSON converters.\n\n=== Use Annotations\n\n- On DTO (`@NotNull`, `@Size`, `@Max`, etc.)\n- On API method parameters (`@Valid`, before `@Body`)\n- Add `@ValidationGroups(groups = {...})` for specific validation\n\n== References\n\n- https://square.github.io/retrofit/\n- https://beanvalidation.org/2.0/[Jakarta Bean Validation 2.0]\n- https://futurestud.io/tutorials/retrofit-2-implementing-custom-converters\n- https://futurestud.io/tutorials/retrofit-2-introduction-to-multiple-converters\n- https://stackoverflow.com/questions/tagged/retrofit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghusta%2Fretrofit-converter-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghusta%2Fretrofit-converter-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghusta%2Fretrofit-converter-validation/lists"}