{"id":36419053,"url":"https://github.com/mwiede/feign-validation","last_synced_at":"2026-01-11T17:02:03.196Z","repository":{"id":57721712,"uuid":"144008267","full_name":"mwiede/feign-validation","owner":"mwiede","description":"A library for Feign containing a decorator which makes it possible to validate reponses using validation-api (JSR349 and JSR380)","archived":false,"fork":false,"pushed_at":"2020-01-05T20:00:32.000Z","size":38,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T12:47:06.169Z","etag":null,"topics":["annotations","bean-validation","decorators","feign","jax-rs","jsr349","jsr380","validation"],"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/mwiede.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}},"created_at":"2018-08-08T12:07:50.000Z","updated_at":"2025-04-03T14:20:27.000Z","dependencies_parsed_at":"2022-09-26T21:50:22.906Z","dependency_job_id":null,"html_url":"https://github.com/mwiede/feign-validation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mwiede/feign-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Ffeign-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Ffeign-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Ffeign-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Ffeign-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwiede","download_url":"https://codeload.github.com/mwiede/feign-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Ffeign-validation/sbom","scorecard":{"id":669871,"data":{"date":"2025-08-11","repo":{"name":"github.com/mwiede/feign-validation","commit":"2967d856c3349b8f4c59e4ef8a0b6df4dac6f3e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T19:36:46.586Z","repository_id":57721712,"created_at":"2025-08-21T19:36:46.587Z","updated_at":"2025-08-21T19:36:46.587Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["annotations","bean-validation","decorators","feign","jax-rs","jsr349","jsr380","validation"],"created_at":"2026-01-11T17:02:02.595Z","updated_at":"2026-01-11T17:02:03.185Z","avatar_url":"https://github.com/mwiede.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feign-validation [![travis status](https://travis-ci.org/mwiede/feign-validation.svg?branch=master)](https://travis-ci.org/mwiede/feign-validation) [![Maven Central](https://img.shields.io/maven-central/v/com.github.mwiede/feign-validation.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.mwiede%22%20AND%20a:%22feign-validation%22)\nA library for Feign containing a decorator which makes it possible to validate reponses using bean validation api 1.1 ([JSR 349](https://jcp.org/en/jsr/detail?id=349)) or bean validation 2.0 ([JSR 380](https://jcp.org/en/jsr/detail?id=380)).\n\nWhile Jersey as the JAX-RS implementation provides [Bean Validation Support](https://jersey.github.io/documentation/latest/bean-validation.html), [Feign](https://github.com/OpenFeign/feign) acts as a client and til now only supports a limited set of annotations\nin it's [JAX-RS module](https://github.com/OpenFeign/feign/tree/master/jaxrs2), meaning `@javax.validation.Valid` or `@javax.validation.groups.ConvertGroup` are not supported.\n\nThis library contains a decorator class, which can be setup within invocationHandlerFactory to retrieve additional validation.\n\n## Motivation\n\nSometimes it is required, that a client also validates the response it got from the providing service/endpoint. With JSR-349 [bean validation](https://beanvalidation.org/), Java provides a nice api for validation purposes. Just by adding annotations like `@NotNull` or `@Email`, contraints can be validated very easily.\nWith JSR-380 you even get support for new date/time data types (JSR 310) and more.\n\n## Versions\n| feign-validation Version | JSR | Validation Api Version |\n|--- | --- | ---\n| 1.x            | JSR-349 support | javax.validation:validation-api:1.1.0.Final |\n| 2.x and beyond | JSR-380 support | javax.validation:validation-api:2.0.1.Final |\n\n## Example\n\nHere is how you can activate bean validation within Feign wrapper client:\n```java\n\ninterface GitHub {\n    @RequestLine(\"GET /repos/{owner}/{repo}/contributors\")\n    @Size(min = 1)\n    @Valid\n    List\u003cContributor\u003e contributors(@Param(\"owner\") String owner, @Param(\"repo\") String repo);\n\n}\n\nstatic class Contributor {\n    @NotNull\n    @Size(min = 10)\n    String login;\n    int contributions;\n}\n\npublic static void main(String... args) {\n\n    Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n\n    GitHub github = ExtendedFeign.builder(validator)//\n            .decoder(new GsonDecoder()).target(GitHub.class, \"https://api.github.com\");\n\n    // Fetch and print a list of the contributors to this library.\n    try {\n        List\u003cContributor\u003e contributors = github.contributors(\"OpenFeign\", \"feign\");\n        for (Contributor contributor : contributors) {\n            System.out.println(contributor.login + \" (\" + contributor.contributions + \")\");\n        }\n    } catch (ConstraintViolationException ex) {\n        ex.getConstraintViolations().forEach(System.out::println);\n    }\n\n}\n\n```\n\n## Download\nWith JSR-380 support:\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.mwiede\u003c/groupId\u003e\n  \u003cartifactId\u003efeign-validation\u003c/artifactId\u003e\n  \u003cversion\u003e2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nWith JSR-349 support:\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.mwiede\u003c/groupId\u003e\n  \u003cartifactId\u003efeign-validation\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiede%2Ffeign-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwiede%2Ffeign-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiede%2Ffeign-validation/lists"}