{"id":18742258,"url":"https://github.com/b-palaniappan/axum-api","last_synced_at":"2025-04-12T21:13:08.527Z","repository":{"id":151336577,"uuid":"612820382","full_name":"b-palaniappan/axum-api","owner":"b-palaniappan","description":"Rust Axum REST api application","archived":false,"fork":false,"pushed_at":"2024-11-21T00:57:46.000Z","size":231,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T21:13:03.923Z","etag":null,"topics":["axum","mysql","rest","rest-api","rust","sea-orm","sqlx"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/b-palaniappan.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":"2023-03-12T04:14:40.000Z","updated_at":"2024-09-25T01:36:35.000Z","dependencies_parsed_at":"2024-04-24T06:38:22.733Z","dependency_job_id":"bf03f7b4-2908-44cd-bca1-888979c8228f","html_url":"https://github.com/b-palaniappan/axum-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-palaniappan%2Faxum-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-palaniappan%2Faxum-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-palaniappan%2Faxum-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-palaniappan%2Faxum-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-palaniappan","download_url":"https://codeload.github.com/b-palaniappan/axum-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631681,"owners_count":21136562,"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":["axum","mysql","rest","rest-api","rust","sea-orm","sqlx"],"created_at":"2024-11-07T16:07:06.874Z","updated_at":"2025-04-12T21:13:08.509Z","avatar_url":"https://github.com/b-palaniappan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# axum API application\nRust Axum REST api application\n\n## Features\n- [x] Create REST API with Axum.\n- [ ] Basic CRUD calls using SeaORM with MySQL DB.\n- [x] Logging.\n- [x] JSON request payload validation.\n- [ ] Add JWT security.\n- [ ] Add roll based JWT.\n- [ ] Global and local api error handling.\n- [ ] Pagination and Sorting of list for filter.\n- [ ] CORS support for API.\n- [ ] Custom validation error response.\n\n#### Global Error Handing Response payload\n```json\n{\n  \"status\": 404,\n  \"time\": \"2022-12-25T15:25:35.089z\",\n  \"message\": \"User not found for id - 2893f9283uo2\",\n  \"debugMessage\": \"User not found for id - 2893f9283uo2\",\n  \"subErrors\": [\n    {\n      \"object\": \"users\",\n      \"field\": \"email\",\n      \"rejectedValue\": \"dummyEmailgmail.com\",\n      \"message\": \"invalid email address\"\n    }\n  ]\n}\n```\n\n#### Pagination response structure\n```json\n{\n  \"data\": [{\n    \"id\": \"usr_DwgQxN3gLRX1p0g7bwny1\",\n    \"userName\": \"john_doe\",\n    \"firstName\": \"john\",\n    \"lastName\": \"Doe\",\n    \"email\": \"john_doe@c12.io\"\n  },\n    {...}\n  ],\n  \"meta\": {\n    \"current_page\": 1,\n    \"page_size\": 20,\n    \"page_count\": 12,\n    \"total_results\": 348,\n    \"search_id\": \"VE4heV3F5m2Vf0GO_dLhu\",\n    \"search_criteria\": \"\",\n    \"sort_by\": \"lastName\"\n  },\n  \"_link\": {\n    \"self\": {\n      \"href\": \"/v1/users?limt=20\u0026offset=40\"\n    },\n    \"previous\": {\n      \"href\": \"/v1/users?limit=20\u0026offset=20\"\n    },\n    \"first\": {\n      \"href\": \"/v1/users?limit=20\u0026offset=0\"\n    },\n    \"next\": {\n      \"href\": \"/v1/users?limit=20\u0026offset=60\"\n    },\n    \"last\": {\n      \"href\": \"/v1/users?limit=20\u0026offset=120\"\n    }\n  }\n}\n```\n\n### References\n- Actix api [example](https://github.com/b-palaniappan/actix-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-palaniappan%2Faxum-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-palaniappan%2Faxum-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-palaniappan%2Faxum-api/lists"}