Skip to content

Releases: TheDarkRabb1t/WebLibrary

WebLibrary - 1.2

Choose a tag to compare

@TheDarkRabb1t TheDarkRabb1t released this 04 Oct 11:44
be7cf2b

Project Updates

User Model & Repository

  • Added User model — Initial creation of the User entity model.
  • Expanded User model — Introduced additional fields for the User model.
  • User repository and service implementation — Added repository and service layer to handle User data.

Security Enhancements

  • Security dependency added — Included security dependencies for managing user roles and authentication.
  • Security configuration — Created a configuration snippet with root user setup in environment variables.
  • Fixed anonymous access on Swagger — Adjusted security to prevent unauthorized GET access to Swagger main page.
  • Global authentication fix — Resolved an issue where global authentication was not applied to the User controller.

Controller & Endpoint Updates

  • User controller snippet implemented — Initial implementation of User controller for handling requests.
  • Role-based access control — Added role requirements for accessing specific controller endpoints.
  • Fixed user creation issues — Addressed errors in the user creation process.
  • URL matchers fix — Adjusted URL matchers for correct routing within the application.

Other Fixes & Improvements

  • Moved enums
  • Added README

WebLibrary - 1.1

Choose a tag to compare

@TheDarkRabb1t TheDarkRabb1t released this 22 Sep 10:16
d8b8727

Project Updates

Swagger Integration

  • Added Swagger UI for API documentation.
  • Access it at /api/swagger-ui.html.

New findAll Methods

  • Implemented findAll methods with paging support.

Full Changelog: 1.0...1.1

WebLibrary - 1.0

Choose a tag to compare

@TheDarkRabb1t TheDarkRabb1t released this 09 Sep 17:54
b52179a

WebLibrary API Documentation

Overview

The WebLibrary application provides RESTful APIs for managing books, authors, and publishers. The application is dockerized and follows standard REST principles.

Base URL

All endpoints are prefixed with /api/v1.

Publisher Controller

Endpoints

Get Publishers by Name

  • URL: /api/v1/publisher/name/{name}
  • Method: GET
  • Description: Retrieves a set of publishers based on the given name.
  • Response: 200 OK with a set of PublisherDTO.

Get Publishers by Address

  • URL: /api/v1/publisher/address/{address}
  • Method: GET
  • Description: Retrieves a list of publishers based on the given address.
  • Response: 200 OK with a list of PublisherDTO.

Create New Publisher

  • URL: /api/v1/publisher
  • Method: POST
  • Description: Creates a new publisher.
  • Request Body: PublisherDTO
  • Response: 201 Created

Update Publisher by ID

  • URL: /api/v1/publisher/{id}
  • Method: PUT
  • Description: Updates an existing publisher by ID.
  • Request Body: PublisherDTO
  • Response: 200 OK

Update Publisher by Name

  • URL: /api/v1/publisher/name/{name}
  • Method: PUT
  • Description: Updates an existing publisher by name.
  • Request Body: PublisherDTO
  • Response: 200 OK

Delete Publisher by ID

  • URL: /api/v1/publisher/{id}
  • Method: DELETE
  • Description: Deletes a publisher by ID.
  • Response: 204 No Content

Delete Publisher by Name

  • URL: /api/v1/publisher/name/{name}
  • Method: DELETE
  • Description: Deletes a publisher by name.
  • Response: 204 No Content

Author Controller

Endpoints

Get Authors by Name

  • URL: /api/v1/author/name/{name}
  • Method: GET
  • Description: Retrieves a list of authors based on the given name.
  • Response: 200 OK with a list of AuthorDTO.

Get Authors by Email

  • URL: /api/v1/author/email/{email}
  • Method: GET
  • Description: Retrieves a set of authors based on the given email.
  • Response: 200 OK with a set of AuthorDTO.

Create New Author

  • URL: /api/v1/author
  • Method: POST
  • Description: Creates a new author.
  • Request Body: AuthorDTO
  • Response: 201 Created

Update Author by ID

  • URL: /api/v1/author/{id}
  • Method: PUT
  • Description: Updates an existing author by ID.
  • Request Body: AuthorDTO
  • Response: 200 OK

Update Author by Email

  • URL: /api/v1/author/email/{email}
  • Method: PUT
  • Description: Updates an existing author by email.
  • Request Body: AuthorDTO
  • Response: 200 OK

Delete Author by ID

  • URL: /api/v1/author/{id}
  • Method: DELETE
  • Description: Deletes an author by ID.
  • Response: 204 No Content

Delete Author by Email

  • URL: /api/v1/author/email/{email}
  • Method: DELETE
  • Description: Deletes an author by email.
  • Response: 204 No Content

Book Controller

Endpoints

Get Books by Title

  • URL: /api/v1/book/title/{title}
  • Method: GET
  • Description: Retrieves a list of books based on the given title.
  • Response: 200 OK with a list of BookDTO.

Get Books by ISBN

  • URL: /api/v1/book/isbn/{isbn}
  • Method: GET
  • Description: Retrieves a set of books based on the given ISBN.
  • Response: 200 OK with a set of BookDTO.

Find Books by Authors

  • URL: /api/v1/book/authors
  • Method: POST
  • Description: Retrieves books based on the given set of authors.
  • Request Body: Set of AuthorDTO
  • Response: 200 OK with a list of BookDTO.

Find Books by Publisher

  • URL: /api/v1/book/publisher
  • Method: POST
  • Description: Retrieves books based on the given publisher.
  • Request Body: PublisherDTO
  • Response: 200 OK with a list of BookDTO.

Get Authors by Book ISBN

  • URL: /api/v1/book/{isbn}/authors
  • Method: GET
  • Description: Retrieves a list of authors for a given book ISBN.
  • Response: 200 OK with a list of AuthorDTO.

Get Publisher by Book ISBN

  • URL: /api/v1/book/{isbn}/publisher
  • Method: GET
  • Description: Retrieves the publisher for a given book ISBN.
  • Response: 200 OK with PublisherDTO.

Create Book

  • URL: /api/v1/book
  • Method: POST
  • Description: Creates a new book.
  • Request Body: BookDTO
  • Response: 201 Created

Update Book by ID

  • URL: /api/v1/book/{id}
  • Method: PUT
  • Description: Updates an existing book by ID.
  • Request Body: BookDTO
  • Response: 200 OK

Update Book by ISBN

  • URL: /api/v1/book/isbn/{isbn}
  • Method: PUT
  • Description: Updates an existing book by ISBN.
  • Request Body: BookDTO
  • Response: 200 OK

Delete Book by ID

  • URL: /api/v1/book/{id}
  • Method: DELETE
  • Description: Deletes a book by ID.
  • Response: 204 No Content

Delete Book by ISBN

  • URL: /api/v1/book/isbn/{isbn}
  • Method: DELETE
  • Description: Deletes a book by ISBN.
  • Response: 204 No Content

Docker Setup

The application is dockerized for easy deployment. Ensure that Docker is installed and application build with compose.yaml file.