{"id":19856887,"url":"https://github.com/davidolveralira/casestudyspringcertification","last_synced_at":"2026-05-09T02:06:08.715Z","repository":{"id":261141686,"uuid":"883388567","full_name":"davidolveralira/CaseStudySpringCertification","owner":"davidolveralira","description":"Spring microservice generating a CRUD with API's for a spring case study for a certification","archived":false,"fork":false,"pushed_at":"2024-11-12T19:00:54.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T07:03:09.994Z","etag":null,"topics":["hibernate","spring-boot","spring-data-jpa","spring-jdbc","spring-mvc","spring-security"],"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/davidolveralira.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-11-04T21:59:40.000Z","updated_at":"2024-11-12T19:48:17.000Z","dependencies_parsed_at":"2024-11-04T23:26:46.431Z","dependency_job_id":"618c6f96-336d-4aed-bdcf-222ea2716f3f","html_url":"https://github.com/davidolveralira/CaseStudySpringCertification","commit_stats":null,"previous_names":["davidolveralira/casestudyspringcertification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidolveralira/CaseStudySpringCertification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidolveralira%2FCaseStudySpringCertification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidolveralira%2FCaseStudySpringCertification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidolveralira%2FCaseStudySpringCertification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidolveralira%2FCaseStudySpringCertification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidolveralira","download_url":"https://codeload.github.com/davidolveralira/CaseStudySpringCertification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidolveralira%2FCaseStudySpringCertification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32804632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["hibernate","spring-boot","spring-data-jpa","spring-jdbc","spring-mvc","spring-security"],"created_at":"2024-11-12T14:16:55.936Z","updated_at":"2026-05-09T02:06:08.670Z","avatar_url":"https://github.com/davidolveralira.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Bookstore Application - API Documentation\n\nThis is a RESTful API for managing a bookstore. The application provides CRUD operations for handling book data. The API is built with Java 11, Spring Boot, Spring Data JPA, MySQL, Gradle, and Lombok.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [API Endpoints](#api-endpoints)\n- [Error Codes](#error-codes)\n- [Examples](#examples)\n\n---\n\n## Installation\n\n1. Clone the repository and navigate to the project folder.\n2. Make sure you have Java 11, Gradle, and MySQL installed.\n3. Set up your MySQL database and update your configuration (see [Configuration](#configuration)).\n4. Run the application with the following command:\n   ```bash\n   ./gradlew bootRun\n   ```\n\n---\n\n## Configuration\n\nUpdate the `application.properties` file with your MySQL database information:\n\n```properties\nspring.datasource.url=jdbc:mysql://localhost:3306/bookstore\nspring.datasource.username=your_mysql_username\nspring.datasource.password=your_mysql_password\nspring.jpa.hibernate.ddl-auto=update\nspring.jpa.show-sql=true\n```\n\n- **Database URL**: Replace `localhost:3306` with your database host and port.\n- **Username** and **Password**: Replace with your MySQL credentials.\n\n---\n##  Swagger UI\nhttp://localhost:8001/swagger-ui.html\n\nhttp://localhost:8001/swagger-ui/index.html\n\n![img.png](img.png)\n\n## API Endpoints\n\n### 1. Get All Books\n\n- **URL**: `/api/v1/bookstore/all`\n- **Method**: `GET`\n- **Description**: Fetches a list of all books in the bookstore.\n- **Response**: Returns an array of book objects.\n\n### 2. Get Book by ISBN\n\n- **URL**: `/api/v1/bookstore/{isbn}`\n- **Method**: `GET`\n- **Path Variable**: `isbn` (String) - ISBN of the book.\n- **Description**: Fetches a book by its ISBN.\n- **Response**: Returns a book object if found, or `404 Not Found` if the book doesn’t exist.\n\n### 3. Add a New Book\n\n- **URL**: `/api/v1/bookstore/add`\n- **Method**: `POST`\n- **Headers**: `Content-Type: application/json`\n- **Body**:\n  ```json\n  {\n      \"isbn\": \"1234567890\",\n      \"title\": \"Book Title\",\n      \"author\": \"Author Name\",\n      \"edition\": \"Edition\"\n  }\n  ```\n- **Description**: Adds a new book to the bookstore.\n- **Response**: Returns the created book object.\n\n### 4. Update Book Edition\n\n- **URL**: `/api/v1/bookstore/update/{isbn}`\n- **Method**: `PUT`\n- **Path Variable**: `isbn` (String) - ISBN of the book to update.\n- **Headers**: `Content-Type: application/json`\n- **Body**:\n  ```json\n  {\n      \"title\": \"Updated Book Title\",\n      \"author\": \"Updated Author\",\n      \"edition\": \"Updated Edition\"\n  }\n  ```\n- **Description**: Updates the details of an existing book, identified by its ISBN.\n- **Response**: Returns the updated book object, or `404 Not Found` if the book doesn’t exist.\n\n### 5. Delete Book by ISBN\n\n- **URL**: `/api/v1/bookstore/delete/{isbn}`\n- **Method**: `DELETE`\n- **Path Variable**: `isbn` (String) - ISBN of the book to delete.\n- **Description**: Deletes a book by its ISBN.\n- **Response**: Returns `204 No Content` if successful, or `404 Not Found` if the book doesn’t exist.\n\n---\n\n## Error Codes\n\n- **500 Internal Server Error**: General server error, usually due to server configuration or unexpected behavior.\n- **404 Not Found**: The requested resource (book) does not exist in the database.\n- **400 Bad Request**: The request is invalid, possibly due to malformed JSON or missing fields.\n\n---\n\n## Examples\n\nHere are some JSON payload examples for testing in tools like Postman:\n\n### Example - Add a New Book\n\n```json\n{\n    \"isbn\": \"9780132350884\",\n    \"title\": \"Clean Code\",\n    \"author\": \"Robert C. Martin\",\n    \"edition\": \"1st\"\n}\n```\n\n### Example - Update Book\n\nURL: `/api/v1/bookstore/update/9780132350884`\n\n```json\n{\n    \"title\": \"Clean Code: A Handbook of Agile Software Craftsmanship\",\n    \"author\": \"Robert C. Martin\",\n    \"edition\": \"2nd\"\n}\n```\n\n---\n\n## Additional Notes\n\n- Ensure that the MySQL database is running and accessible.\n- This API uses Lombok to reduce boilerplate code, so ensure your IDE supports it.\n\nFor any additional questions or assistance, feel free to reach out. Enjoy using the Bookstore API!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidolveralira%2Fcasestudyspringcertification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidolveralira%2Fcasestudyspringcertification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidolveralira%2Fcasestudyspringcertification/lists"}