{"id":18390595,"url":"https://github.com/salma-4/product-management-api","last_synced_at":"2026-05-02T20:41:24.123Z","repository":{"id":238168302,"uuid":"764293745","full_name":"salma-4/Product-Management-API","owner":"salma-4","description":"refactor from spring MVC to spring rest","archived":false,"fork":false,"pushed_at":"2024-02-29T23:24:22.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T03:21:51.461Z","etag":null,"topics":["hibernate","lombok","maven","mysql-database","spring-rest","swagger","unit-testing"],"latest_commit_sha":null,"homepage":"","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/salma-4.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":"2024-02-27T20:26:03.000Z","updated_at":"2024-05-04T16:24:51.000Z","dependencies_parsed_at":"2024-05-04T18:29:56.733Z","dependency_job_id":"da7a728a-219d-4b7d-91d7-4a8288db609b","html_url":"https://github.com/salma-4/Product-Management-API","commit_stats":null,"previous_names":["salma-4/product-management-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salma-4/Product-Management-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salma-4%2FProduct-Management-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salma-4%2FProduct-Management-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salma-4%2FProduct-Management-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salma-4%2FProduct-Management-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salma-4","download_url":"https://codeload.github.com/salma-4/Product-Management-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salma-4%2FProduct-Management-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["hibernate","lombok","maven","mysql-database","spring-rest","swagger","unit-testing"],"created_at":"2024-11-06T01:48:29.662Z","updated_at":"2026-05-02T20:41:19.114Z","avatar_url":"https://github.com/salma-4.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product Management API\n\nThis project implements a RESTful API for managing product details and products. It provides endpoints to perform CRUD operations on product details and retrieve product information.\n\n### Prerequisites\n\n- Java 8+\n- Maven\n\n## Features\n\n1. **Insert Product**\n   - Method: (POST)\n   - Endpoint: `/api/products`\n   - Request Body: ProductDetails JSON object\n   - Response: ProductDetails JSON object\n   - Example Request Body:\n    ```json\n    {\n    \"name\": \"\",\n    \"expirationDate\": \"2078-12-02\",\n    \"manufacturer\": \"\",\n    \"price\": 10.5,\n    \"available\": true\n    }\n     \n   \n2. **Update productDetails**:\n   - Method: PUT\n   - Endpoint: `/api/products`\n   - Request Body: ProductDetails JSON object\n   - Response: ProductDetails JSON object\n   - Example Request Body:\n    ```json\n    {\n    \"id\":\n    \"name\": \"\",\n    \"expirationDate\": \"2078-12-02\",\n    \"manufacturer\": \"\",\n    \"price\": 10.5,\n    \"available\": true\n    }\n     \n\n3. **Delete Product **: \n   - Method: DELETE\n   - Endpoint: `/api/products?id=`\n   - Path Variable: ID of the product to delete\n\n4. **Get Product Details by ID**:\n   - Method: GET\n   - Endpoint: `/api/products/productDetailsById?id=`\n   - Path Variable: ID of the product to retrieve\n   - Response: ProductDetails JSON object\n\n5. **Get Product Details by Name**:\n   - Method: GET\n   - Endpoint: `/api/products/productDetailsByName?searchKey=`\n   - Query Parameter: Name of the product to retrieve\n   - Response: ProductDetails JSON object\n\n6. **Get All Products**:\n   - Method: GET\n   - Endpoint: `/api/products`\n   - Response: List of Product JSON objects\n\n7. **Get Product by ID**: \n   - Method: GET\n   - Endpoint: `/api/products/productById?id=`\n   - Path Variable: ID of the product to retrieve\n   - Response: Product JSON object\n\n\n## Documentation\n\nThe APIs are documented using Swagger. You can access the Swagger UI by navigating to `/swagger-ui.html` after starting the application.\n![swagger](https://github.com/salma-4/Product-Management-API/assets/116264673/77557eae-dcc7-49c3-b075-d781ae459886)\n\n## Postman Collection\n\nA Postman collection containing requests for each EndPoint , import this collection into Postman to test the APIs.\n![post](https://github.com/salma-4/Product-Management-API/assets/116264673/56439488-9d80-4e1a-8b5d-f6d6af4451e4)\n\n\n## Testing\n\nTest cases are written using RestTemplate to ensure the functionality of the API.\n\n![1](https://github.com/salma-4/Product-Management-API/assets/116264673/670e83b2-194c-4238-bc47-b29710aa2d63)\n![test](https://github.com/salma-4/Product-Management-API/assets/116264673/831ff62f-058c-49fb-a54a-fd92d6cbce29)\n\n\n### Interacting with the API\n\nYou can interact with the API using any REST client or HTTP testing tool. The API uses JSON for request and response data(Jakson).\n\n``` jakson dependencies\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.fasterxml.jackson.core\u003c/groupId\u003e\n      \u003cartifactId\u003ejackson-databind\u003c/artifactId\u003e\n      \u003cversion\u003e2.16.1\u003c/version\u003e\n    \u003c/dependency\u003e\n    \n    \n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.fasterxml.jackson.core\u003c/groupId\u003e\n      \u003cartifactId\u003ejackson-core\u003c/artifactId\u003e\n      \u003cversion\u003e2.16.1\u003c/version\u003e\n    \u003c/dependency\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalma-4%2Fproduct-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalma-4%2Fproduct-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalma-4%2Fproduct-management-api/lists"}