{"id":15138497,"url":"https://github.com/bardiademon/vertxrest","last_synced_at":"2025-10-23T15:30:22.617Z","repository":{"id":169680113,"uuid":"645684363","full_name":"bardiademon/VertxRest","owner":"bardiademon","description":"Vert.x Rest","archived":false,"fork":false,"pushed_at":"2023-08-14T21:47:37.000Z","size":74,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T19:07:46.509Z","etag":null,"topics":["bardiademon","java","rest","rest-api","vertx","vertx-web"],"latest_commit_sha":null,"homepage":"https://bardiademon.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bardiademon.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-05-26T07:50:06.000Z","updated_at":"2024-12-18T23:20:51.000Z","dependencies_parsed_at":"2024-09-16T12:33:58.505Z","dependency_job_id":"5a7cfb0c-5a62-4f41-9894-2bea2becd45b","html_url":"https://github.com/bardiademon/VertxRest","commit_stats":null,"previous_names":["bardiademon/vertxrest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bardiademon%2FVertxRest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bardiademon%2FVertxRest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bardiademon%2FVertxRest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bardiademon%2FVertxRest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bardiademon","download_url":"https://codeload.github.com/bardiademon/VertxRest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843770,"owners_count":19375201,"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":["bardiademon","java","rest","rest-api","vertx","vertx-web"],"created_at":"2024-09-26T07:40:20.878Z","updated_at":"2025-10-23T15:30:22.144Z","avatar_url":"https://github.com/bardiademon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VertxRest\n\n## This is the repository for Vert.x rest.\n\n### Vert.x Rest for convenience in rest api programming\n\n# How use\n\n```java\n\n@Rest(method = RequestMethod.POST, path = {\"/tst\" , \"/test\"}, db = false, dto = TestDto.class, validator = TestValidation.class)\npublic final class TestRest extends RestController\u003cTestDto, String\u003e {\n    @Override\n    public void handler(final RestHandler\u003cTestDto, String\u003e restHandler) throws Exception {\n        restHandler.success(Response.TEST);\n    }\n}\n```\n\n### Rest\n\n```java\n\n@Retention(RetentionPolicy.RUNTIME)\n@Target(ElementType.TYPE)\npublic @interface Rest {\n    RequestMethod method() default RequestMethod.ANY;\n\n    String[] path() default {};\n\n    String produces() default \"application/json\";\n\n    String consumes() default \"application/json\";\n\n    boolean db() default true;\n\n    Class\u003c?\u003e dto() default NothingDto.class;\n\n    Class\u003c?\u003e[] validator() default {};\n\n    boolean authentication() default false;\n\n    UserRole[] roles() default UserRole.ANY;\n}\n```\n\n## Rest Specifies that the class is a Rest\n\n+ method: Specifies the request method\n+ path: Specifies the route\n+ produces: Specifies what this request produces\n+ consumes: Specifies what this request consumes\n+ db: Determines whether this Rest requires a database connection or not\n+ dto: Defines the input Dto class\n+ validator: It defines the classes that are used to validate the DTO\n+ authentication: Checking the user login with the token created from sign-in rest\n+ roles: If authentication is enabled, this item is checked and the access level is determined\n\n### RestController\n\n```java\npublic abstract class RestController\u003cREQUEST, RESPONSE\u003e {\n\n    public RestController() {\n    }\n\n    abstract public void restHandler(final Handler\u003cREQUEST, RESPONSE\u003e restHandler) throws Exception;\n}\n```\n\n### Handler\n\n```java\npublic interface Handler\u003cREQUEST, RESPONSE\u003e {\n    void fail(final Throwable throwable , final ServerResponse\u003cRESPONSE\u003e response);\n\n    void fail(final Throwable throwable);\n\n    void fail(final Throwable throwable , final RESPONSE info , final Response response);\n\n    void fail(final ServerResponse\u003cRESPONSE\u003e response);\n\n    void fail(final RESPONSE info , final Response response);\n\n    void fail(final Response response);\n\n    void success(final ServerResponse\u003cRESPONSE\u003e serverResponse);\n\n    void success(final RESPONSE info , final Response response);\n\n    void success(final RESPONSE info);\n\n    void success(final Response response);\n\n    REQUEST request();\n\n    RoutingContext routingContext();\n\n    Vertx vertx();\n\n    SQLConnection sqlConnection();\n\n    UserEntity user();\n}\n```\n\n\u003ch1 align=\"center\"\u003e\n    💻 Technologies\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?style=for-the-badge\u0026message=Java\u0026color=782A90\u0026logo=Java\u0026logoColor=e11f21\u0026label=\" alt=\"Java\"/\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?style=for-the-badge\u0026message=Eclipse+Vert.x\u0026color=782A90\u0026logo=Eclipse+Vert.x\u0026logoColor=FFFFFF\u0026label=\" alt=\"Vert.x\"/\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\n    🌟 Spread the word!\n\u003c/h1\u003e\n\nIf you want to say thank you:\n\n- Add a GitHub Star to the project!\n- Follow my GitHub [bardiademon](https://github.com/bardiademon)\n\n\u003ch1 align=\"center\"\u003e\n    ⚠️ License \u0026 📝 Credits\n\u003c/h1\u003e\n\nby bardiademon [https://bardiademon.com](https://www.bardiademon.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbardiademon%2Fvertxrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbardiademon%2Fvertxrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbardiademon%2Fvertxrest/lists"}